JavaScript Wtfs
JavaScript
{} + [] = WTF
Where WTF is 0...
typeof [] + 10
typeof {} + 10
2 == [2] //true
2 === [2] //false
The equality operator translates to this:
2 === Number([2].valueOf().toString())
{} + [] = WTF
Where WTF is 0...
typeof [] + 10
typeof {} + 10
2 == [2] //true
2 === [2] //false
The equality operator translates to this:
2 === Number([2].valueOf().toString())