Update exercises
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ let total = prompt('How many digits in the number?');
|
|||||||
let max = 5;
|
let max = 5;
|
||||||
total = Number(total);
|
total = Number(total);
|
||||||
for (let x = 0; x < total; x++) {
|
for (let x = 0; x < total; x++) {
|
||||||
const ranNumber = Math.floor(Math.random() * max) + 1;
|
const ranNumber = Math.floor(Math.random() * (max + 1)) ;
|
||||||
tempNum += ranNumber;
|
tempNum += ranNumber;
|
||||||
}
|
}
|
||||||
console.log(tempNum);
|
console.log(tempNum);
|
||||||
|
|||||||
Reference in New Issue
Block a user