O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

Passing the input to the controller

Here’s where it all comes together. We have a controller waiting—just dying—to get a guess from the player. All we need to do is pass the player’s guess to the controller. Let’s do that:

image with no caption


Cover of Head First JavaScript Programming


How to pass the guess to be processed? A tip: look at how the code re-sets the input text-box to zero after the user has entered his/her guess.