This repository features a simple number-guessing game implemented in JavaScript. In this game, players attempt to guess a randomly generated secret number between 1 and 100, receiving feedback on their guesses until they find the correct number.
Key Features:
-Random Number Generation: The game generates a random secret number between 1 and 100 at the start of each session. -User Input: Players input their guesses through prompts, and the game provides immediate feedback. -Input Validation: The game checks for valid numeric input, guiding users to enter a number if their guess is invalid. -Cancellation Option: Players can cancel the game at any time, exiting with a message.
How It Works:
-Secret Number Creation: A random number is generated as the target for the player to guess. -Guessing Loop: Players are prompted to guess the number, receiving feedback on whether their guess is too low, too high, or correct. -Feedback Mechanism: The game informs players if their guess is incorrect and allows them to continue guessing until they find the secret number or cancel the game. -End of Game: The game concludes when the correct number is guessed or the player decides to exit.
This project serves as an engaging introduction to basic programming concepts in JavaScript, including loops, conditionals, and user input handling. It’s an excellent resource for beginners looking to practice their coding skills in a fun and interactive way.