RosaBF / Guess-the-number

This is a game created entirely with JavaScript.
https://rosabf.github.io/Guess-the-number/
0 stars 0 forks source link

Code review #1

Open igarrido-adalab opened 3 years ago

igarrido-adalab commented 3 years ago

Really cool job @RosaBF !!!

Here you have some tips to improve the exercise:

JavaScript: basic

JavaScript: advanced

JavaScript: good practices

Good practices

HTML

Steps to finish the game (for those far from the solution)

You are close to the exercise solution, but here you have a steps guide to complete it anyway ;)

  1. Init counter of trials to 0.
  2. Define a function that executes when the user clicks on the button, that
  1. Assign a listener to the button click to execute both functions.

Further challenges

Then you can improve the game as you please, here you have some ideas:

Call to action

Let me know if you have any doubts ;)

Go for it!!

Do not close this issue until your teacher asks you to

RosaBF commented 3 years ago

Hi Ivan,

All changes are done except this one:

"You are writing many times "trackEl.innerHTML = 'something';", what about making a function that accepts a string as param and paints it into 'trackEl'?"

I have written to you a Slack message with this issue. Unfortunately I am a bit stuck with it. I f you could give me a hand I'd really appreciate it.

Thank you very much for all the comments.