Skip to content

nanthakumar-m/Guess_the_number-Javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔢 Guess The Number – Interactive JavaScript Game

Guess The Number is a fun and interactive web-based number guessing game built using HTML, CSS, and vanilla JavaScript. A random number between 1 and 20 is generated, and the player must guess it with hints provided based on the input. The game keeps track of score and high score, encouraging repeated play.

This project was developed to reinforce my JavaScript fundamentals, especially focusing on DOM manipulation, event handling, and implementing conditional logic for user interactions.

🔗👉click here to see the live demo-->https://nanthakumar-m.github.io/Guess_the_number-Javascript/

🚫 Note: This website is not responsive and is best viewed on desktop screens.

⚙️ Technologies Used

  • HTML5
  • CSS3
  • JavaScript

💡Core Features

✅ Generates a random number between 1 and 20

✅ Displays real-time feedback: "Too high", "Too low", or "Correct"

✅ Tracks current score and updates high score

✅ Dynamic UI updates (background color, width change, message updates)

✅ "Play Again" button resets game state cleanly

🎯 What I Gained / Concepts Practiced

✅ DOM Selection and Event Binding using addEventListener()

✅ Conditional Rendering using if, else if, and ternary operator

✅ Efficient UI updates using class and style manipulation

✅ Real-time input validation and feedback

✅ Practiced clean code principles (like DRY with ternary)

✅ Enhanced logical thinking through game flow development

📸 Screenshots

image

image

image

image

About

A fun number-guessing game built using JavaScript to enhance logical thinking and user interaction skills.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published