Skip to content

Commit e9d4ba3

Browse files
author
russom
committed
Update Math.random method description
1 parent 6f5e1ca commit e9d4ba3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-2/1-key-exercises/4-random.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
99
// Try logging the value of num and running the program several times to build an idea of what the program is doing
1010

1111
// 1. num is a variable that stores the final result of the expression assigned to it.
12-
// 2. The Math.random() method generates a random decimal number from 0 up but not excluding 1.
12+
// 2. The Math.random() method returns a pseudo-random floating number between 0(inclusive) and 1(exclusive).
1313
// 3. The Math.floor() method round a decimal number down to a whole number.
1414
// 4. (maximum - minimum + 1) calculates how many possible whole numbers there are.
1515
// Java Script evaluates the expressions inside the inner parentheses first.

0 commit comments

Comments
 (0)