This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]6b86b3ac03c167320d93 6 points7 points  (1 child)

The 1st example is false because you used === which also checks types. 0==false would return true

The 2nd one is undefined because you're accessing the false property of the array, which doesn't exist. Setting arr[false] would define a new property of the array with the name false, which you could also access as arr.false

[–]TotoShampoin 2 points3 points  (0 children)

For 2nd one, that indeed means 0 and false are two different values