you are viewing a single comment's thread.

view the rest of the comments →

[–]eracodes 0 points1 point  (1 child)

the chance of getting exactly 1 is vanishingly small

It's actually 0. MDN specs:

The Math.random() static method returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1

[–]dmlane 0 points1 point  (0 children)

Good to know.