We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f02e4 commit 238ca63Copy full SHA for 238ca63
Sprint-1/1-key-exercises/4-random.js
@@ -7,3 +7,8 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
7
// Try breaking down the expression and using documentation to explain what it means
8
// It will help to think about the order in which expressions are evaluated
9
// Try logging the value of num and running the program several times to build an idea of what the program is doing
10
+
11
+// Here, Math.rondom creates a random number between 0 to 1 and Math.floor rounds donw to the nearest integer.
12
+// When creating a random number between 0 and 1, we will multiply it by the (100 - 1 + 1), then round it down to the nearest integer
13
+// Then add all of that to 1.
14
0 commit comments