Skip to content

Commit d7636e9

Browse files
Further correction of file format
1 parent ce7a6d0 commit d7636e9

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1111
console.log(num);
1212

1313
//First operation
14-
// num is generating a random dicimal number with method Math.random() between 0 and 1 result eg :0.3948605
14+
//num is generating a random dicimal number with method Math.random() between 0 and 1 result eg :0.3948605
1515

1616
//Second operation
1717
//The generated number is multiplied by the range+1 which is between 1-100 result eg 39.48605
1818

1919
//Third operation
2020
//num is rounded down to the nearset whole number using the method Math.floor restult eg 39.48605 => 39
2121

22-
// Last operation is to add the "minimum" (in this case it's 1 or it can be changed to any changed number e.g 10) this will shift the random number so it starts counting from minimum, instead of from zero.
23-
// eg . num was 39 => 40
22+
//Last operation is to add the "minimum" (in this case it's 1 or it can be changed to any changed number e.g 10) this will shift the random number so it starts counting from minimum, instead of from zero.
23+
//eg . num was 39 => 40
2424
//num is a random whole number from 1 to 100.
25-
26-

0 commit comments

Comments
 (0)