You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//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
15
15
16
16
//Second operation
17
17
//The generated number is multiplied by the range+1 which is between 1-100 result eg 39.48605
18
18
19
19
//Third operation
20
20
//num is rounded down to the nearset whole number using the method Math.floor restult eg 39.48605 => 39
21
21
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.
0 commit comments