Quiz Question 1 of 5
What does Math.random()
do?
Choose the correct answer below:
-
A
It produces a random number from 0 up to but not including 1. For example, it could return 0, 0.3898784155026078, but never 1.
-
B
It produces a random number between 1 and 6.
-
C
It produces a random number from 0 to any number you give it. For example,
Math.random(6)
returns a number from 0 to 6. -
D
It produces a random number from 0 up to and including 1. For example, it could return 0, 0.3898784155026078, or 1.