How to parse a number as base 10?
<p>In <a href="http://stackoverflow.com/questions/15748801/what-happens-when-a-number-has-a-leading-zero">my last question</a>, I discovered that a number with a leading 0 is parsed as an octal number. In <a href="http://stackoverflow.com/questions/850341/how-do-i-work-around-javascripts-parseint-octal-behavior/850346">this question</a>, <a href="http://stackoverflow.com/a/850346/1101095">the answer</a> says:</p>

<blockquote>
  <p>This is a common Javascript gotcha with a simple solution:</p>
  
  <p>Just specify the base, or 'radix', like so:</p>
  
  <p>parseInt('08',10); // 8</p>
</blockquote>

<p>That works, but only if the number is enclosed in quotes. Consider the following example:</p>

<pre><code>var test = 0132;
alert(parseInt(test, 10));
</code></pre>

<p>JSFiddle: <a href="http://jsfiddle.net/VU96M/2/" rel="nofollow">http://jsfiddle.net/VU96M/2/</a></p>

<p>The output of that is "90," not "132."</p>

<p>So, as you can see, the solution does not work int this case. </p>

<p>If I have a variables passed to a function as a parameter, or returned from a function, that has a leading zero like the above variable <code>test</code>, how can I parse it as a base 10 value?</p>
