Understanding Functions

Functions are a fundamental building block of JavaScript. A function is a JavaScript procedure: a set of statements that performs a specific task. To use a function, you must define it before your script can call it.