Skip to content

Commit a11d682

Browse files
Refine explanation in random number generation logic for clarity and accuracy
1 parent ca07b89 commit a11d682

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
@@ -20,7 +20,7 @@ EXPLANATION IN ORDER OF EXECUTION (OPERATOR PRECEDENCE):
2020
calculates the total number of possible values between minimum and maximum, (but not including) 100 (e.g., 0 to 99.999...).
2121
2222
4. Math.floor(...) — Function Call:
23-
Rounds up the decimal to the nearest whole number, giving a whole number from 0 to 99.
23+
Rounds the decimal down to the nearest whole integer, converting the range from [0, 99.999...] to an integer from 0 to 99.
2424
2525
5. + minimum — Addition (Lowest Precedence):
2626
Shifts the whole set of numbers up so that the lowest outcome becomes `minimum` (1) instead of 0, resulting in a whole number between 1 and 100 inclusive.

0 commit comments

Comments
 (0)