Skip to content

Commit 18c0b10

Browse files
committed
updated answer to 4-random.js
1 parent c03010a commit 18c0b10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1111
console.log(num);
1212

1313
// num represents any randomly generated number between 1 and 100.
14-
// Math.random pulls a random decimal, Math.floor rounds down to nearest whole number, (maximum - minimum + 1) sets the range, adding the minimum of 1 at the end allows for the possibility of a random number being 100 instead of 99.
14+
// Math.random pulls a random decimal, Math.floor rounds down to nearest whole number, (maximum - minimum + 1) sets the range of 0-99.

0 commit comments

Comments
 (0)