title: How can I get a one-digit random number in JavaScript?
body: <blockquote>
  <p><strong>Possible Duplicate:</strong> <br />
  <a href="https://stackoverflow.com/questions/1527803/generating-random-numbers-in-javascript-in-a-specific-range">Generating random whole numbers in JavaScript in a specific range</a></p>
  </blockquote>
  
  <p>How can I get one-digit random numbers (1, 2, 3, ..., not 0.1, 0.2, ... or 1.0, 5.0, ...) using Math.random() or some other way in JavaScript?</p>