Implemented in | Navigator 2.0 |
function name([param] [, param] [..., param]) {
statements}
name | The function name. |
param | The name of an argument to be passed to the function. A function can have up to 255 arguments. |
return
statement that specifies the value to return. You cannot nest a function statement in another statement or in itself.
In addition to defining functions as described here, you can also define Function
objects.
//This function returns the total dollar amount of sales, when
//given the number of units sold of products a, b, and c.
function calc_sales(units_a, units_b, units_c) {
return units_a*79 + units_b*129 + units_c*699
}
Last Updated: 10/31/97 12:29:59