Skip to content

Commit e072bbc

Browse files
committed
Add clearer explanation for random.js
1 parent 51e97e9 commit e072bbc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1414
// Try logging the value of num and running the program several times to build an idea of what the program is doing
1515
console.log(num);
1616
//I have run it several times and I saw that the number is changing each time.
17+
/*Each time the program runs, Math.random() generates a new random decimal,
18+
so 'num' changes on every run. However, it will never go below the minimum
19+
value (1) or above the maximum value (100). The bounds are 1 and 100.*/

0 commit comments

Comments
 (0)