Skip to content

Commit cfceef2

Browse files
solving exercise 0.js
1 parent dc792ba commit cfceef2

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const minimum = 1;
1+
const minimum = 10;
22
const maximum = 100;
33

44
const 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)

‎Sprint-2/2-mandatory-errors/0.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
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?*/

0 commit comments

Comments
 (0)