Javascript, why treated as octal
<p>I'm passing as parameter an id to a javascript function, because it comes from UI, it's left zero padded. but it seems to have (maybe) "strange" behaviour?</p>

<pre><code>    console.log(0000020948);  //20948
    console.log(0000022115);   //9293 which is 22115's octal 
    console.log(parseInt(0000022115, 10));  // 9293 which is 22115's octal
    console.log(0000033959);  //33959
    console.log(20948);  //20948
    console.log(22115); //22115
    console.log(33959); //33959
</code></pre>

<p>how can I make sure they are parsing to right numebr they are? (decimal)</p>

<p>EDIT:</p>

<p>just make it clearer:</p>

<p>those numbers  come from the server and are zero padded strings. and I'm making a delete button for each one.</p>

<p>like:  </p>

<pre><code>function printDelButton(value){
          console.log(typeof value);  //output string 
  return '&lt;a href="#" onclick="deleteme('+value+')"&gt;&lt;img src="images/del.png"&gt;&lt;/a&gt;'
}

and 

function printDelButton(value){
console.log(typeof value); //output numeric
    console.log(value);   //here output as octal .... :S
 }
</code></pre>

<p>I tried :<code>console.log(parseInt(0000022115, 10));  // 9293 which is 22115's octal</code> and still parsing as Octal</p>
