title: Why JavaScript treats a number as octal if it has a leading zero
body: <pre><code>var x = 010;
  console.log(x); //8
  </code></pre>
  
  <p>JS engine convert the number <code>x</code> to octal number. Why it happens? How can I prevent it?</p>