Created
April 18, 2017 07:12
-
-
Save danielkaczmarczyk/51bde1ed386404d32ec448fdf50d2ffd to your computer and use it in GitHub Desktop.
error while checking for ===
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function guessNumber(number) { | |
guess = prompt("Guess a number between 1 and 100"); | |
console.log("guess after prompt:", guess); | |
guess = +guess; | |
console.log("guess after +guess", guess); | |
if (guess === number) { | |
return console.log("You got it! The number was", number); | |
} | |
return guessNumber(guess); | |
} | |
guessNumber(12); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment