title: JavaScript toString limits
body: <p>So my problem is this, I'm writing a program that checks if number is even or odd without division. So I decided to take the number, turn it into a String with the </p>
  
  <pre><code>number.toString()
  </code></pre>
  
  <p>method. The problem I'm having is that if you put a number that is about 17 or more digits long the string is correct for about the first 17 digits then it's just 0's and sometimes 2's. For example,</p>
  
  <pre><code>function toStr (number) 
  {
      return number.toString(10);
  }
  
  console.log(toStr(123456789123456789));
  </code></pre>
  
  <p>prints, </p>
  
  <pre><code>123456789123456780
  </code></pre>
  
  <p>any ideas?</p>