🌐 Live Demo: Click here to visit site
This is a fun and interactive Number Guessing Game built using HTML, CSS, and JavaScript. The user tries to guess a randomly generated number between 1 and 10, with limited lives represented by heart icons.
- 🔢 Guess a number between 1 and 10
- ❤️ Lives shown with heart icons (max 3 chances)
- 🔁 Restart button appears after win or loss
- 🎉 Immediate feedback with win/loss messages
- HTML5
- CSS3 (Simple responsive UI styling)
- JavaScript (Random number generation and DOM interaction)
- Clone the repository:
git clone https://github.com/huzaifa-frontend/number-guessing-game-javascript.git
- Navigate to the project folder:
cd number-guessing-game-javascript
- Open
index.html
in your browser.
- Random number generation from 1 to 10
- Input validation with error message handling
- Responsive heart-based life system
- Disable and hide input when the game ends
- Restart option to play again
📦 number-guessing-game-javascript
┣ 📄 index.html
┣ 📄 style.css
┣ 📄 script.js
┣ 📄 README.md
┗ 📄 LICENSE
- Designed & Developed by Muhammad Huzaifa Karim.
- No external libraries used.
This project is licensed under the MIT License - see the LICENSE file for details.
Muhammad Huzaifa Karim
GitHub Profile
This project is deployed via GitHub Pages. Any changes pushed to the main branch will automatically update the live site.
For any queries or collaboration requests, feel free to reach out via GitHub.
© 2025 Muhammad Huzaifa Karim