Events are user interactions with their computer, such as a mouse click or key press.
In the good ol’ days, computers handled user interactions as input of batched data. The user fed a hunk of data in, the computer did something to that data, then produced the results. With the advent of interactive devices like the GUI interface, computers could display answers to computations onscreen. The input for these interactions are events caused by the user, which could be keystrokes, button clicks, or the position of the mouse pointer.
(see Event Handler).
x + 10
x < 10
are expressions since they can be evaluated, while
x = 10
is simply a statement
A function is a named group of statements in a program that performs a task when it is invoked.
For example, in a normal array, you’d have:
dinner = "monkey brain";
dinner = "meatloaf";
But in a hash, you could use a string as the index:
dinner["monday"] = "monkey brain";
dinner["tuesday"] = "meatloaf";
Much like standing behind your co-worker while she slaves away, hover implies standing by but not doing anything. In dHTML, it refers specifically to when the user has positioned her cursor over a link but not yet clicked anything. The style will not change if the cursor is simply passed over the link, but you can set an action to take place after a predetermined amount of hovering.