Slide 17
Slide 17 text
WAT2? and WTF
Why JavaScript Is So Awesomely S**k, by Pavel Kaminsky
NaN instanceof Number
false
NaN === NaN
false
[5,4,3,2,1].sort()
[1,2,3,4,5]
[-5,-4,-3,2,-1].sort()
[-1,-3,-4,-5,2]
3 > 2 > 1
false
Number(null) //0, but
null != 0 //yeah, source
'abc'.constructor == String
typeof 'abc'
"string"
'abc' instanceof String
false
var hello = function(){
console.log('hi')};
//run that
((hello)() + 'World!')
//result
hi
"undefinedworld"