— The problem is hasOwnProperty is slow on objects, but what about Arrays? Maybe index in arr is faster
index in arr
Message permanent page
Oki guys, a question for you without looking up the reason.null > 0 //falsenull === 0 //falsenull >= 0 //trueWhy
— 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,Edit: null != 0
null == 0
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 :)
— When you use Object.getOwnPropertyNames(array) you actually know 'something' (even undefined) is on that position.
— How slow is that