Skip to content

Commit dcf3d6f

Browse files
committed
Manipulated the code several times to get an idea of how the works and and how to get a random number
1 parent b82600e commit dcf3d6f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
.DS_Store
33
.vscode
4+
testing.js
45
**/.DS_Store

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
const minimum = 1;
2-
const maximum = 100;
1+
const minimum = 1000;
2+
const maximum = 9999;
33

4-
const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
4+
num = Math.floor(Math.random() * (maximum - minimum) + 1);
5+
6+
console.log(num);
57

68
// In this exercise, you will need to work out what num represents?
79
// Try breaking down the expression and using documentation to explain what it means

0 commit comments

Comments
 (0)