Changes

Jump to: navigation, search

Understanding JavaScript Functions

31 bytes added, 14:49, 19 March 2009
Passing Arguments to a Function
</pre>
<google>ADSDAQBOX_FLOW</google>
In this example, the function is called multiple times, passing through arguments that are then used in the function to construct a string to be displayed in the alert dialog. To achieve this without functions it would be necessary to repeat the script in the function 3 times over in the body. Clearly, placing the script in a function and re-using it over and over is a much more efficient approach.

Navigation menu