name([param] [, param] [..., param])
The function statement declares a function with its specified
parameters, which can include numbers, strings and objects. To return
a value, a function must have a return
statement specifying the value to return.
The word, function, is a reserved word. You cannot name a function,
"function". Rather, use a word, or blend of words, that describe the
purpose that the function performs.
The following code declares a function that calculates the average
of three numbers and returns the result:
function calcaverage(a, b, c)
document.write(calcaverage(2, 4, 6));