title: Performance when comparing the results of indexOf
body: <p>As you probably already know, the returned values of <code>indexOf</code> are either the <code>index</code> (found) or <code>-1</code> (not found).</p>
  
  <p>There are many ways to test this result, some of them are:</p>
  
  <pre><code>if (result != -1) //different than -1
  if (result &gt;= 0) //greater or equal to 0
  </code></pre>
  
  <p>And other not so common options:</p>
  
  <pre><code>if (result + 1) //-1 turns to: -1 + 1 = 0 (falsish value)
  if (~result) //-1 turns to: -(-1 + 1) = 0 (falsish value)
  </code></pre>
  
  <p>And countless of other options...</p>
  
  <p>Which method performs good across all browsers?</p>