In JavaScript, whenever I name the array variable as "name", the result prints the wrong number. I am wondering why this is happening.
var name = [1, 3, 4];
console.log(name.length);
this prints 5
rather than 3
.
In JavaScript, whenever I name the array variable as "name", the result prints the wrong number. I am wondering why this is happening.
var name = [1, 3, 4];
console.log(name.length);
this prints 5
rather than 3
.