Skip to content

Commit 04451b1

Browse files
tested and explained the difference between Math.floor() and Math.ceil()
1 parent 5bc8fbe commit 04451b1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1212
// math.random returns a random number in [0,1)
1313
// (maximum - minimum + 1) provide a range of generated random number
1414
// num is a random whole number [1,100]
15-
console.log(num);
15+
console.log(num);
16+
console.log(Math.floor(4.4))
17+
console.log(Math.ceil(4.4))

0 commit comments

Comments
 (0)