title: Why does ("foo" === new String("foo")) evaluate to false in JavaScript?
body: <p>I was going to start using === (triple equals, strict comparison) all the time when comparing string values, but now I find that </p>
  
  <pre><code>"foo" === new String("foo")
  </code></pre>
  
  <p>is false, and same with this:</p>
  
  <pre><code>var f = "foo", g = new String("foo");
  f === g; // false
  </code></pre>
  
  <p>Of course:</p>
  
  <pre><code>f == g; // true
  </code></pre>
  
  <p>So is it recommended to always use == for string comparison, or always convert variables to strings before comparing?</p>