There was an error while loading. Please reload this page.
1 parent 2582f53 commit 5da1022Copy full SHA for 5da1022
1 file changed
Sprint-2/1-key-exercises/4-random.js
@@ -6,8 +6,8 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
6
//1.num represents a number which is an Integer.
7
//2.lets start by (maximum-minimum +1) which the output is 100.
8
//3.math.random()*100 returns random number between 0 and 100, what actually
9
-// happens is that math.randum gives out random number from 0 to 1 which 1 is
10
-// not included and in this case, multiply the out put by 100.
+// happens is that math.randum gives out random number from 0 to 1 which 1 is
+// not included and in this case, multiply the output by 100.
11
//4.math.floor()it rounds a number to thier nearest integer, which means it drops all the decimal.
12
//5.at the end we add 1 which is the minimum.
13
console.log(num);
0 commit comments