2. How to define Functions.
Here you can know that how you can define a function first of all define function is also called a Function declaration, or Function statement. consists of the function keyword, followed by:
1.The name of the function.
2.A list of parameters to the function, enclosed in parentheses and separated by commas.
This code defines the simple function (square).
The function square takes one parameter, called number. The function consists of one statement that says to return the parameter of the function (that is, number) multiplied by itself. The statement return specifies the value returned by the function:
Top comments (0)