Message from JavaScript discussions

September 2017

— Other than using a loop or other discrete builtin


Here is how I currently do it:

— It does not tell those two arrays apart and correctly iterate the assigned index 49

— The problem is hasOwnProperty is slow on objects, but what about Arrays? Maybe index in arr is faster

Message permanent page

— Oki guys, a question for you without looking up the reason.

null > 0 //false
null === 0 //false
null >= 0 //true


Message permanent page

— 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, 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 :)

Message permanent page