Code that waits for something to happen
Apps don't run top to bottom — they wait. When a key is pressed or a button is clicked (an event), the app runs the function registered for it (the handler).
Challenge A:events is a pretend list of key presses: [key, beat]. handlers maps keys to drums. For each key, beat in events, call handlers[key](beat).