Function
What is a Function :
A javaScript function is executed when “something” invokes it calls it .
You can use the same code many times with different arguments, to produce different results.
JavaScript Function Syntax :
function nameOfFunction(Parameters)
{
// code to be executed;
}
-
Function parameters are listed inside the parentheses () in the function definition.
-
Function arguments are the values received by the function when it is invoked.