title: What does -~ do in JavaScript?
body: <p>I am looking at someone else's code and I am trying to figure out what they are doing. The snippet in question looks like the following:</p>
  
  <pre><code>for(j in a)     
    for(i in a)
      y=a[i]+-~j,b=a[j]
  </code></pre>
  
  <p>I understand the <code>y=a[i]</code> part, but what does <code>+-~j</code> do?</p>