4 ms·
Most of these WTF examples basically boil down to JS doing type coercion willy-nilly. This 'feature' makes writing conditionals slightly shorter, in exchange fo
by _broody 12y ago
Most of these WTF examples basically boil down to JS doing type coercion willy-nilly. This 'feature' makes writing conditionals slightly shorter, in exchange for introducing the possibility of massive bugs everywhere in your code at any moment. Seriously, f* JS type coercion.
The other misfeature I hate is that accessing undefined properties doesn't raise an error (then, but you can be sure it will make your program blow up a bit later).
Typescript helps to solve both.
- dccoolgai 12y agohttp://leftoversalad.tumblr.com/post/103503118002?utm_source=javascriptweekly&utm_medium=email http://leftoversalad.tumblr.com/post/103503118002?utm_source...