Let’s practice conditions. Create a guessing game
Hint: use if/else, typeof(), Number()
- Write a guessing game where you prompt the player to guess the number you predefined
- If the guessed number is correct, output ‘YOU WIN!’
- If the guessed number is too high, output ‘TOO HIGH!’
- If the guessed number is too low, write ‘TOO LOW!’
Hint: use switch/case
- Write a guessing game where you prompt the player to guess the color you predefined
- If the guessed color is the same as the correct color, output “Correct!”
- Otherwise output ‘Try again’