Changes

Understanding JavaScript Functions

47 bytes removed, 18:38, 24 April 2007
Declaring and Calling a JavaScript Function
The ''name'' specifies how we will refer to this function when we call it. The ''arguments'' specify values that are passed through to the function to be processed. The ''statements'' section represents the body of the function that performs the processing. The optional ''return'' statement allows a value to be returned the section of scripted that called the function (for example to return a status or the result of a calculation.
Arguments and return values are not mandatory. the The following simple example shows a function defined in the ''<head>'' section of an HTML page and a ''call'' to this function in the ''<body>'':
<pre>