title: In JS if (condition) means == true or === true
body: <p>I know the difference between <code>==</code> and <code>===</code> however I always believed that <code>if (condition)</code> <code>condition</code> was supposed to be evaluated against <code>true</code> using strict equality (<code>===</code>) and not type-coercing equality (<code>==</code>).</p>
  
  <p>See an example:</p>
  
  <pre><code>if (1) {
      console.log("1");
  }
  
  if (1 == true) {
      console.log("2");
  }
  
  if (1 === true) {
      console.log("3");
  }
  </code></pre>
  
  <p>It returns:</p>
  
  <pre><code>::1
  ::2
  </code></pre>
  
  <p>I know 1 is not strictly equal to <code>true</code>, because the type is different, but when I do <code>if (condition)</code> according to W3C it should be the strict equality test (<code>===</code>) that is run not the type-coercing equality of <code>==</code>.</p>
  
  <p>So why is it logging 1?</p>