3 ms·
Such beauty: http://wtfjs.com http://wtfjs.com
by CmonDev 12y ago
Such beauty: http://wtfjs.com http://wtfjs.com
- pluma 12y agoOh, come on now. Most of these are edge cases of passing in invalid data into functions that try to make sense of it, using discouraged functionality (e.g. not using strict-mode or using obscure parts of the language that are only supported for backwards-compatibility) and the rest shows just a complete lack of understanding of the language. One of the "WTFs" is `"true" == true` being false. Double-equals comparison being discouraged aside, the only language in which I would expect that to be true is PHP. Another is about `getElementById` -- that's not even about the language, it's about the DOM (which has WTFs of its own right and still would have them if you used a different language in the browser). If you want a good laugh about JS, I recommend Destroy All Software's infamous WAT talk (which also contains some Ruby).