Skip to content

Commit 887fcdd

Browse files
committed
explainaton
1 parent 78c873b commit 887fcdd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
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 mean
88
// It will help to think about the order in which expressions are evaluated
9+
910
// Try logging the value of num and running the program several times to build an idea of what the program is doing
1011
num reprents the number is randomly generated whole number betweeb 1 and 100,inclusive
1112
Math.random() returns a random decimal between 0(inclusive) and 1(exclusive). while maximum-minimum +1=100, Math.random()*(maximum-matchMedia+1)

0 commit comments

Comments
 (0)