Number Guesser Challenge Project (JavaScript)


I just completed this challenge. Was not really sure about the function updateScore(), so my code there is slightly different than others’. It works of course, but maybe it makes things look more complicated than they should. Happy to receive any feedback! Thanks in advance!

Hello! I have just completed my first project, here is the code I ended up with. I didn’t try too had on the alert function, however the rest of the code is what I could come up with. Please take a look at my code and let me know if there is anything I should try or things to look out for moving forward. Thank you.

Hello there!
After 2 days, I also completed my first project, and I am stuck on the alert and other additonal function now
For the most part, it was challenging and interesting to do!!

Hey everyone! Here is my solution to this challenge. If anyone could give me some pointers on how to force the user to resubmit a guess if their first guess was out of range without editing the game.js file for the project, that would be much appreciated :slight_smile:

Hey yall, this was my solution to the project

Hi all!

Here’s my solution to the challenge. Gotta admit, can’t get the input checker working to see if the user input a number between 0 - 9. I can’t get an alert box to pop up. If anyone has any tips on how to get the alert box to show up, I would greatly appreciate it.

Thank you!

Hello everyone! I am trying to solve the project (step 8) specifically adding the alert if the number is out of the range 0 - 9 (code line 26).

I am not sure why a JS alert box isn’t appearing. I tried adding this to the solution code but the same issue persists. Any ideas?

Thank you in advance!

Here is my code for this challenge. I didn’t feel like I understood very well how to complete this challenge the fist time I tried, therefore I tried it again and it was much more clear. Overall great challege!

Hi :slight_smile:

I think I know the problem

You wrote:

//step 8 (extension - alert)
if (userGuess < 0 && userGuess > 9){
alert(‘Number is out of range. Please enter a number between 0 and 9.’);

However, this must not be an AND, it must be an OR link since both states cannot occur at the same time.

I hope I could help you.

Hello, my first try with Git-Hub. I hope this will work :slight_smile:

Here is my code with both extensions:

and this is the shorter version

thanks for the ideas @meliguillen10 @blog0376503659 @designsurfer17101