title: Format a number to a string in javascript
body: <p>I can't figure out how to solve the following problem.</p>
  
  <ul>
  <li>I have an array of numbers from 1 to 100. </li>
  <li>I need to convert them to strings but to a length of 5.</li>
  </ul>
  
  <p>So, for instance:</p>
  
  <blockquote>
    <p>1 becomes 00001<br>
    2 becomes 00002<br>
    3 becomes 00003<br>
    4 becomes 00004<br>
    etc, etc..  </p>
  </blockquote>
  
  <p>It seems so easy but I cannot find a function. The best I found was .toFixed(n) which is the number of decimal points to use.</p>