title: Javascript, base 10 to base 8
body: <p>How do I convert base 10 to base 8 in javascript? I tried with <code>parseInt(text, 8)</code> but the problem with that, is when I write 8 or 9 it says <code>NaN</code> I know 8 and 9 don't exists in base 8. But it should say 10 and 11 instead of <code>NaN</code></p>
  
  <p>EDIT: Here is the whole function</p>
  
  <pre><code>            function toBaseEight(){
                  var text = document.getElementById('base10').value;
                  var base8 = parseInt(text, 8);
                  document.getElementById('base8').innerHTML = base8;
              }
  </code></pre>