File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const minimum = 1 ;
1+ const minimum = 10 ;
22const maximum = 100;
33
44const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
@@ -19,17 +19,17 @@ console.log(test)
1919//Second operation
2020//The generated number is multiplied by 100 being (maximum =100 -1 +1)
2121
22- test =Math.random() *(maximum - minimum +1);
22+ test =test *(maximum - minimum +1);
2323 console.log(test)
2424
2525 //Third operation
2626 //num is rounded down to the nearset whole number using the method Math.floor
2727
28- test = Math.floor(Math.random() * (maximum - minimum + 1))
29- console.log(test)
28+ test = test+ minimum;
29+ console.log("test+ minimum" , test)
3030
3131 // Last operation is to add 1 to num 1 is stored in a variable called minimum
3232
33- test =Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
33+ test =Math.floor(test)
3434 console.log(test)
35- console.log(num)
35+ // console.log(num)
Original file line number Diff line number Diff line change 1- This is just an instruction for the first activity - but it is just for human consumption
2- We don 't want the computer to run these 2 lines - how can we solve this problem?
1+ /* This is just an instruction for the first activity - but it is just for human consumption
2+ We don't want the computer to run these 2 lines - how can we solve this problem?*/
You can’t perform that action at this time.
0 commit comments