You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//num represents a randomly generated whole number between 1 and 100.
8
8
9
9
// Try breaking down the expression and using documentation to explain what it means
10
-
// Math.random() generates a random decimal number greater than or equal to 0 and less than 1. Multiplying it by 100 gives a number between 0 and 100.
10
+
// Math.random() generates a random decimal number greater than or equal to 0 and less than 1. Multiplying by 100 gives a number between 0 and up to, but not including 100.
11
11
// Math.floor() always rounds down and returns the largest integer less than or equal to a given number in this case between 0 and 99. Finally, adding 1 changes the range to 1–100.
0 commit comments