There was an error while loading. Please reload this page.
1 parent 5f24463 commit 444c0faCopy full SHA for 444c0fa
1 file changed
Sprint-2/1-key-exercises/4-random.js
@@ -8,4 +8,9 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
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
-console.log(num)
+console.log(num)
12
+
13
+math.floor is round down the number returns to largest integer less than or equal to a given number.
14
+math.random() could generate the number from 0 to <1 b random.
15
+maximum refer to 100 and minimum refer to 0.
16
+The calculation of num is different everytime because of math.random()
0 commit comments