Hi Devs! π
I'm excited to share my first mini project β a Random Number Game built using HTML, CSS, and JavaScript. It's a simple yet fun way to strengthen your JavaScript basics like Math.random() and Math.floor().
π§ How the Game Works
The game generates a random number between 1 and 10.
You get 10 chances to guess it right.
Each wrong guess reduces your score by 1.
If you guess right, you win!
If your score reaches 0, it's Game Over.
π Live Demo
π Play the Game Here(https://tamilselvan1812.github.io/15_RandomNumberGame/)
π§βπ» Code on GitHub
π View the Code on GitHub(https://github.com/Tamilselvan1812)
π₯οΈ Tech Stack Used
β HTML5
π¨ CSS3 (with gradient animations)
βοΈ JavaScript (Math.random, DOM manipulation, event handling)
π What I Learned
DOM Manipulation
Basic Input Handling
Styling UI with gradients and animations
Using Math.random() and Math.floor() to generate random numbers
Improving user experience with alert and game logic
Thanks for reading! If you liked this game, leave a β€οΈ and follow me for more beginner-friendly projects!
Top comments (11)
honestly pretty cool seeing you grind out these mini projects like this - you think small daily projects make you learn faster or is it more about just sticking with it no matter what?
Thanks, I really appreciate that! I think doing small daily projects helps a lot with learning because you're constantly applying what you know and picking up new things as you go. But honestly, consistency is probably the bigger pieceβjust showing up every day and building something, even if it's small, makes a big difference over time.
you're bot. stop posting automated comments LOL
Great job! A fun way to practice JS..
Thank you mate!
Love the colorful gradients and smooth UI on this! Are you planning to add any new features like difficulty levels or scoreboards?
Thank you so much! Really glad you liked the gradients and UI β that means a lot. π
Yes, I'm actually considering adding features like difficulty levels and a scoreboard in upcoming updates. Always open to suggestions, so feel free to share any ideas you think would make it even better!
That's really cool project to start with!!
Thank you! I really appreciate the kind words. Itβs been a fun project to work on, and Iβm excited to keep building and improving it!
Great starter project!
Appreciate it! Just trying to start small and build momentumβglad it came across well.