function expression - 01

Function expression 

Defining a function in an expression is called function expression. Function expressions and function declarations are similar. The only difference between a function expression and a function declaration is the absence of a function identifier or function name in a function expression.


A function without a name (anonymous function) is stored into a variable and ends with a semicolon is called function expression. 


Since function expression does not have a function name or identifier, so the name of the variable will be considered as a function identifier or function name. 


To invoke or call a function expression, write the variable name in which the function expression is stored and then write parentheses. Arguments will be inside the parentheses.










variableName(argument1, argument2)


Post a Comment

Previous Post Next Post