title: parseInt vs unary plus, when to use which?
body: <p>What are the differences between this line:</p>
  
  <pre><code>var a = parseInt("1", 10); // a === 1
  </code></pre>
  
  <p>and this line</p>
  
  <pre><code>var a = +"1"; // a === 1
  </code></pre>
  
  <p>This <a href="http://jsperf.com/parseint-vs-unary-operator" rel="noreferrer">jsperf test</a> shows that the unary operator is much faster in the current chrome version, assuming it is for node.js!?</p>
  
  <p>If I try to convert strings which are not numbers both return <code>NaN</code>:</p>
  
  <pre><code>var b = parseInt("test" 10); // b === NaN
  var b = +"test"; // b === NaN
  </code></pre>
  
  <p>So when should I prefer using <code>parseInt</code> over the unary plus (especially in node.js)???</p>
  
  <p><strong>edit</strong>: and what's the difference to the double tilde operator <code>~~</code>?</p>