Skip to content

Commit ae3854e

Browse files
changed lines 13 and 15 to include end numbers
1 parent b67539e commit ae3854e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1010

1111
console.log(num);
1212

13-
//num is a random number [1,100]
13+
//num is a random number between 1 and 100 including 1 and 100 [1,100]
1414
//Math.floor rounds the decimal number to nearest lower number
15-
// Math.random() generates a random decimal number between 0 and 1
15+
// Math.random() generates a random decimal number between 0 and 1 including 0 and 1 [0,1]
1616
// when max – min need to add +1 or not all the numbers will be
1717
// included for instance max=5 min=1 5-1=4 but there are
1818
// 5 numbers, 1, 2, 3, 4,5 so need to +1

0 commit comments

Comments
 (0)