DEV Community

Cover image for Number Guessing Game
masspopcorn
masspopcorn

Posted on • Edited on

Number Guessing Game

Intro

Hey everyone! This is a number guessing game I made. Let me know if you like the code!


Description/Instructions

Guess the number! Hint: It's between 1-100.


Outro

Thanks for reading and playing! Here are some socials.

Repl Profile: dudeactualdev

Github Profile: dudeactual

Github Repository: Number-Guessing-Game

DEMO: guessing-game

Top comments (5)

Collapse
 
grahamthedev profile image
GrahamTheDev • • Edited

correct guess was 78

I think there may be something not quite right with your code (randomNumber = Math.floor(Math.random() * 100) + 1;)! The number was 78 🤣

Other than that, fun little game!

Collapse
 
dudeactual profile image
masspopcorn •

Oops! Thanks

Collapse
 
saraiva1989 profile image
Daniel Saraiva • • Edited

cool.
You could generate the random in the back-end so you wouldn't be able to use the browser console to find out the number lol.

But for academic purposes very good.

Collapse
 
dudeactual profile image
masspopcorn •

Thanks for the feedback!

Collapse
 
sumanta_thefrontdev profile image
SumantaWeb •

Is it simple like enter a guess and if it's correct then add points??