Why is ~null === -1?
<p>A questions that stumped me on <a href="http://asserttrue.blogspot.co.uk/2013/02/are-you-javascript-guru-try-this-test.html?utm_source=feedburner&amp;utm_medium=twitter&amp;utm_campaign=Feed%3a+hnycombinator+%28HN+-+hnycombinator%29" rel="nofollow">this JavaScript test</a> was that <code>~null</code> evaluates to <code>-1</code>.</p>

<p>Why does <code>~null</code> evaluate to <code>-1</code>?</p>
