Skip to content

Commit 421bdf2

Browse files
committed
random.js solution part is fixed.
1 parent f2f56be commit 421bdf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1313

1414
// SOLUTION:
1515

16-
// num represents a random number between the minimum and maximum values.
16+
// In this program, variable num is assigned to a value between 1 and 100.
1717

18-
// program is designed for num to return random numbers between 1-100.
18+
// In 5th line, expressions of math.floor and math.random are used to generate a random number between the minimum and maximum numbers that are defined by first const minimum= 1 and second const maximum = 100.
1919

20-
//expressions of math.floor and math.random are there for //generating a random number between the minimum and maximum values and then rounding it down to the nearest whole number...
20+
// Also math.floor is used to round down the random number generated by math random to get to the nearest whole number.

0 commit comments

Comments
 (0)