loading...

re: Some Things About JSON That You May Have Missed VIEW POST

TOP OF THREAD FULL DISCUSSION
re: value === NaN is always false. For example NaN === NaN. Use isNaN().
 
 

You should actually be using Number.isNan() over the global isNaN function which will give somewhat unexpected results in comparison to the newer method on the Number object. You should also use !Number.isFinite() instead of checking equality with Infinity.

Thanks. That's also a good tip.

I think equality is still good as long as we use triple equals.

code of conduct - report abuse