Talk by Claudia Hernández, on a few of Javascript’s oddities and (un)expected behaviors:
There’s a presentation embedded in this post. View it on Speaker Deck.
For a language originally created in 10 days it surely has a lot of quirks and perks many JS developers are unaware of. Sometimes, it might even seem like we fell down the rabbit hole only to find that
NaN
is actually aNumber
,undefined
can be defined,+!![]
equals1
,Array.sort()
may not work as you suspected and so much other nonsense that can trip any JS developer’s mind.
Related: Equality in JavaScript, wtfjs, and – save best for last – wat