3 ms·
Re: strict equality everywhere. If you "fail to see the argument for not using it", then you're not trying hard enough. Javascript was not designed with stric
by pretoriusB 14y ago
Re: strict equality everywhere.
If you "fail to see the argument for not using it", then you're not trying hard enough.
Javascript was not designed with strict equality check in mind. The coercion it does can be harmful if you don't know how it works, but it can be very useful and liberating if you do.
Essentially, but restricting yourself to "strict equality" you make Javascript a less dynamic language. Sometimes "20" is as good as 20.
Dimitry Baranovsky, of Raphael fame, wrote about this specific issue:
http://dmitry.baranovskiy.com/post/typeof-and-friends http://dmitry.baranovskiy.com/post/typeof-and-friends