Y
Hacker News
new
|
ask
|
show
|
jobs
by
nassimm
1235 days ago
Math.random() generates a decimal that can be 0 but is less than 1, so when multiplied by 6 the range is 0-5.99999, which is then rounded down.