Sure. Distinguishing between up and down allows us to do shift keys, click-and-drag and gestures like that.
They are events, and the browser calls our event handler with an event object
That event object allows us to tell what key went up or down.
Closures are so cool. Very often, we have a function that will be called with a particular set of arguments (maybe none) that we don't have control over, but, we need that function to have some additional information in some variables.
We could use global variables for that information, but then no one else can use that global variable. Global variables should, in general, be minimized.
Furthermore, all five click handlers in Ottergram needed to use
the thumb
variable, and they can't all use the same
global variable for that.
Closures allow each function to have its own variable for its use.
Amazing!