A function definition consists of the function keyword, followed by:
The function name
A list of arguments, enclosed in parentheses and separated by commas
JavaScript statements that define the function, enclosed in braces { }
For example, to define a simple function named square, you type
The function name is square; the argument is number. The statement is return number * number. The function returns the value of the argument multiplied by itself.