javascript problem with parseint
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/850341/workarounds-for-javascript-parseint-octal-bug">Workarounds for JavaScript parseInt octal bug</a>  </p>
</blockquote>



<p>I am trying to parse an integer number. </p>

<pre><code>a = parseInt("0005")  &lt;- gives 5
a = parseInt("0008")  &lt;- gives 0
</code></pre>

<p>Can someone explain what's happening? It doesn't make any sense to me.</p>
