Reacting to Input

  • To react to input, we want to run a block of code when something happens
  • Functions are a good way of organizing "a block of code"
  • What can happen?
    • The user clicks a button
    • The user types something into a textbox
    • The user moves their mouse over an element
    • The user scrolls the page
    • The user taps the arrow keys
    • Much more...

10 / 12