|
@@ -11,7 +11,7 @@ console.log(Math.ceil(num)) //round up
|
|
|
|
|
|
|
|
// let min = 10
|
|
// let min = 10
|
|
|
// let max = 20
|
|
// let max = 20
|
|
|
-// let randomNum = Math.floor(Math.random() * (max - min + 1)) // floor( 10 to 10.999 )
|
|
|
|
|
|
|
+// let randomNum = Math.floor(Math.random() * (max - min + 1)) + min// floor( 10 to 10.999 )
|
|
|
// //0 to 10
|
|
// //0 to 10
|
|
|
// console.log(randomNum)
|
|
// console.log(randomNum)
|
|
|
|
|
|
|
@@ -19,7 +19,9 @@ console.log(Math.ceil(num)) //round up
|
|
|
// 1 - 5 - true if correct - false if not correct
|
|
// 1 - 5 - true if correct - false if not correct
|
|
|
|
|
|
|
|
let makeGuess = function (guess) {
|
|
let makeGuess = function (guess) {
|
|
|
- let randomNum = Math.ceil(Math.random()* (4 + 1))
|
|
|
|
|
|
|
+ let min = 1
|
|
|
|
|
+ let max = 5
|
|
|
|
|
+ let randomNum = Math.floor(Math.random() * (max - min + 1)) + min
|
|
|
console.log(randomNum)
|
|
console.log(randomNum)
|
|
|
return guess === randomNum
|
|
return guess === randomNum
|
|
|
}
|
|
}
|