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