The 12th video in our JavaScript Tutorials series. Here, we create a basic number guessing game using a loop and a break statement to exit our loop.
Original source
The 12th video in our JavaScript Tutorials series. Here, we create a basic number guessing game using a loop and a break statement to exit our loop.
Original source
2 responses to “JavaScript Tutorials #12 – Breaks – How To Create A Guessing Game”
nice tutorial
for random number:
if (Math.random() < 0.5);
alert("You won this bet!");
else
alert("Sorry you lost!");
}
}
Can you show me how to create the guessing game using textbox instead of prompt with guess turn time and try again button?