Question: Guess game var max = 1000; var guess = Math.floor(Math.random() * max) * 1; label = document.getElementById(output); function tryGuess() { usrAnswer = Number(document.getElementById(guess).value); if (usrAnswer

Guess game

Modify the program to count the number of guesses the player makes. If the number is 10 or fewer, display Either you know the secret or you got lucky! If the player guesses the number in 10 tries, display Ahah! You know the secret! If the player makes more than 10 guesses, display You should be able to do better!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!