Skip to content

A simple number guessing game built with HTML, CSS, and JavaScript. Includes a heart-based life system, input validation, win/loss feedback, and restart functionality.

License

Notifications You must be signed in to change notification settings

huzaifa-frontend/number-guessing-game-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Number Guessing Game (JavaScript)

🌐 Live Demo: Click here to visit site

📋 Overview

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

💻 Technologies Used

  • HTML5
  • CSS3 (Simple responsive UI styling)
  • JavaScript (Random number generation and DOM interaction)

🚀 How to Use

  1. Clone the repository:
    git clone https://github.com/huzaifa-frontend/number-guessing-game-javascript.git
  2. Navigate to the project folder:
    cd number-guessing-game-javascript
  3. Open index.html in your browser.

🛠️ Features

  • 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

📁 File Structure

📦 number-guessing-game-javascript
 ┣ 📄 index.html
 ┣ 📄 style.css
 ┣ 📄 script.js
 ┣ 📄 README.md
 ┗ 📄 LICENSE

✨ Credits

  • Designed & Developed by Muhammad Huzaifa Karim.
  • No external libraries used.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

✍️ Author

Muhammad Huzaifa Karim
GitHub Profile

🔄 Deployment

This project is deployed via GitHub Pages. Any changes pushed to the main branch will automatically update the live site.

📬 Contact

For any queries or collaboration requests, feel free to reach out via GitHub.


© 2025 Muhammad Huzaifa Karim

About

A simple number guessing game built with HTML, CSS, and JavaScript. Includes a heart-based life system, input validation, win/loss feedback, and restart functionality.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published