function
.
Functions are defined at the beginning of a page, in the <head>
section.
The script below uses two methods of the object String to check the alphabetic name:
|
|
|
|
var
, within a function, the variable can only be accessed within that function.
When you exit the function, the variable is destroyed.