<story><title>JavaScript Equality Table</title><url>http://dorey.github.io/JavaScript-Equality-Table/</url></story><parent_chain><item><author>Xophmeister</author><text>Your rephrasing is better. For example, there&amp;#x27;s no reason to do:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    typeof someVar === &amp;#x27;number&amp;#x27;
&lt;/code&gt;&lt;/pre&gt;
...because `typeof` always returns a string, by spec[1]&lt;p&gt;1. &lt;a href=&quot;http://www.ecma-international.org/ecma-262/5.1/#sec-11.4.3&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.ecma-international.org&amp;#x2F;ecma-262&amp;#x2F;5.1&amp;#x2F;#sec-11.4.3&lt;/a&gt;</text></item><item><author>judah</author><text>I like the end of the article. &amp;quot;Use three equals unless you fully understand the conversions that take place for two-equals.&amp;quot;&lt;p&gt;Or better said, &amp;quot;Always use 3 equals unless you have a good reason to use 2.&amp;quot;</text></item></parent_chain><comment><author>hajile</author><text>Removing a single character is hardly worth the issues that may arise from not using it. The only quasi-acceptable use of &amp;#x27;==&amp;#x27; IMHO is:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    myVar == null
&lt;/code&gt;&lt;/pre&gt;
as it is a little easier than:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    myVar === undefined || myVar === null
&lt;/code&gt;&lt;/pre&gt;
That said, I use only &amp;#x27;===&amp;#x27; as I don&amp;#x27;t want to ever worry about my code (plus, the use of a maybe monad makes this and other problems go away).</text></comment>
<story><title>JavaScript Equality Table</title><url>http://dorey.github.io/JavaScript-Equality-Table/</url></story><parent_chain><item><author>Xophmeister</author><text>Your rephrasing is better. For example, there&amp;#x27;s no reason to do:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    typeof someVar === &amp;#x27;number&amp;#x27;
&lt;/code&gt;&lt;/pre&gt;
...because `typeof` always returns a string, by spec[1]&lt;p&gt;1. &lt;a href=&quot;http://www.ecma-international.org/ecma-262/5.1/#sec-11.4.3&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.ecma-international.org&amp;#x2F;ecma-262&amp;#x2F;5.1&amp;#x2F;#sec-11.4.3&lt;/a&gt;</text></item><item><author>judah</author><text>I like the end of the article. &amp;quot;Use three equals unless you fully understand the conversions that take place for two-equals.&amp;quot;&lt;p&gt;Or better said, &amp;quot;Always use 3 equals unless you have a good reason to use 2.&amp;quot;</text></item></parent_chain><comment><author>mattdesl</author><text>Well, there is a reason: consistency. ;)&lt;p&gt;I hate seeing &amp;quot;==&amp;quot; in code because it&amp;#x27;s rarely clear whether the programmer intends it to coerce or just didn&amp;#x27;t bother with the third keystroke. So &amp;quot;===&amp;quot; is just enforced everywhere through jshint.</text></comment>