— It does not tell those two arrays apart and correctly iterate the assigned index
The problem is
hasOwnProperty is slow on objects, but what about Arrays? Maybe
index in arr is faster
— Oki guys, a question for you without looking up the reason.
null > 0 //false
null === 0 //false
null >= 0 //true
— Coercion, null coerces to false and false coerces to 0, that gives answer to 1 and 3
— === checks value as well as type
— Null == 0 is false as well.
null == 0 but
typeof null != typeof 0,
null != 0
— Null != 0, cool
— Don't know why though, need to have a look
— I hadn't even thought of it. Came to know of it from a blog a friend had written. Thought you guys would like to know :)
The blog. Not a plug.
— When you use
Object.getOwnPropertyNames(array) you actually know 'something' (even undefined) is on that position.