title: JS - How can I generate a long random number?
body: <p>I know that I need to use Math.random() for making random numbers, but today I tried to make a random number between 1 and 9999...(9 repeated 19 times) and my output always ends in 3-5 zeroes. How can I generate more detailed random numbers?</p>
  
  <p>What I've done:</p>
  
  <pre><code>const foo = Math.floor(Math.random() * parseInt("9".repeat(19)));
  </code></pre>
  
  <p>Also, I'm pretty sure I know how to do this, but if anyone can tell me, how do I pad zeroes to get to a certain digit count?
  (ex. pad(15,4) becomes 0015 because the you need 2 more digits to make it 4 digits long)</p>