title: JavaScript - Preventing octal conversion
body: <p>I'm taking a numerical input as an argument and was just trying to account for leading zeroes. But it seems javascript converts the number into octal before I can do anything to the number. The only way to work around it so far is if I pass the number as a string initially but I was hoping there'd be another way to convert it after it is passed? So far tried (using <code>017</code> which alerted me to the octal behaviour):</p>
  
  <pre><code>017.toString(10) // 15
  parseInt(017,10) // 15
  017 + "" //15
  new Number(017) //15
  
  new Number('017') //17
  parseInt('017', 10) // 17
  </code></pre>
  
  <p>So given</p>
  
  <pre><code>function(numb) {
  
  if (typeof numb === number) {
  // remove leading zeroes and convert to decimal
  }
  else {
   // use parseInt
  }
  
  }
  </code></pre>
  
  <p>'use strict' also doesn't seem to solve this as some older posts have suggested. Any ideas?</p>