kaitlyncaldwell / Magic-8-Ball

A magic eight ball program with the actual 20 possible answers!
1 stars 1 forks source link

Code currently won't ever use last response #2

Open wblakecaldwell opened 4 days ago

wblakecaldwell commented 4 days ago

from the docs:

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

the random number will never be 1, so Math.floor(Math.random()*19) can never be 19.