Note that the official
In addition to the ECMA-262 specification that standardizes the
Figure 1-2 illustrates the result of clicking the button.
function is defined in the second half of the example, inside a
tag. The function reads the user's input from the form, does the math required to compute the loan payments, and
Example 1-3 is not a short example, but it is straightforward, and it is worth taking the time to look at it