Friday, April 13, 2012

QUIZ: JavaScript the Worst Parts ;-)

Every JS newcommer must love this language ;-))
Just and old collection, more is comming with anti-examples from "leading librares code";-))

Try to answer:

new Number(null)
new Number(undefined)
parseInt(null)
parseInt(undefined)
NaN instanceof Number
10 instanceof Number
Number(10) instanceof Number
typeof NaN
typeof 10
typeof new Number(10)
toString.call(NaN)
toString.call(10)
toString.call(Number(10))
NaN == NaN
NaN === NaN
NaN.toString
['a','b'][NaN]
if(NaN)