Skip to content

Commit 72bce3d

Browse files
key exercise (4-random)
1 parent fc4edcc commit 72bce3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ const minimum = 1;
22
const maximum = 100;
33

44
const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
5-
5+
console.log(num);
66
// In this exercise, you will need to work out what num represents?
77
// Try breaking down the expression and using documentation to explain what it means
88
// It will help to think about the order in which expressions are evaluated
99
// Try logging the value of num and running the program several times to build an idea of what the program is doing
10+
11+
// represents a whole random number between 1 and 100

0 commit comments

Comments
 (0)