posted 13 years ago
Just to add a bit: functions can be passed around in JavaScript. So you can pass a function to another function, which can then call the passed-in function later. Related to this concept are closures. To use JavaScript effectively it's really important to understand how all this works.