Declares a function.
Syntax
function functionName([param] [...]) {
statement
}
Example
function myAlert(alertText) {
alert(alertText) //Alerts the text passed in by alertText.
}
Remarks
Declaring a function allows you to reuse code over and over as many times as you like.