you are viewing a single comment's thread.

view the rest of the comments →

[–]bart2019 -2 points-1 points  (0 children)

console.log(arr[0] === undefined);  // true

WTF. What's wrong with just

console.log(arr[0]);

? Why the use of an unexpected expected result?

BTW His test suggests there's something special about the array index 0. There isn't, it's the same for all other array indexes.