File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ const maximum = 100;
44const num = Math . floor ( Math . random ( ) * ( maximum - minimum + 1 ) ) + minimum ;
55console . log ( num ) ;
66// In this exercise, you will need to work out what num represents?
7- // num represents random whole number between 1 to 100
7+ // num represents random whole number in the interval [1, 100]
88//It is generated by:
9- //Creating a random decimal between 0 and 1 using Math.random()
10- //Scaling it to the range 1 to 100
9+ //Creating a random decimal in the interval[0'1)] using Math.random()
10+ //Scaling it to in the interval [1, 100]
1111//Rounding it down using Math.floor() so it becomes an integer
1212
1313// Try breaking down the expression and using documentation to explain what it means
You can’t perform that action at this time.
0 commit comments