title: Concept of Math.floor(Math.random() * 5 + 1), what is the true range and why?
body: <p>By multiplying the random number (which is between 0 and 1) by 5, we make it a random number between 0 and 5 (for example, 3.1841). Math.floor() rounds this number down to a whole number, and adding 1 at the end changes the range from between 0 and 4 to between 1 and 5 (up to and including 5).</p>
  
  <p>The explanation above confused me... my interpretation below:</p>
  
  <p>--adding the 5 gives it a range of 5 numbers
  --but it starts with 0 (like an array?)
  --so it's technically 0 - 4
  --and by adding the one, you make it 1 - 5</p>
  
  <p>I am very new to JS, don't even know if this kind of question is appropriate here, but this site has been great so far. Thank you for any help!</p>