how do I convert an integer to binary in javascript?
<p>I'd like to see integers, positive or negative, in binary.</p>

<p>Rather like this question, but for javascript.
<a href="http://stackoverflow.com/questions/5263187/how-can-i-print-a-integer-in-binary-format-in-java">How can i print a integer in binary format in java</a></p>

<p>Added-
Answers given so far, using toString(2), don't work for -1</p>
