0

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.

Satpal
  • 132,252
  • 13
  • 159
  • 168
Seungho Lee
  • 1,068
  • 4
  • 16
  • 42

0 Answers0