function is a block of statements, which is written to perform a particular task. A function declaration is also termed as Function Statement. When we create a function and assigned to a variable like any other value then it is called function expression. In Javascript, functions are first-class citizens, meaning functions can be treated like any else.
Table of contents
What is a function?Function declarationFunction ExpressionFunction Statement vs ExpressionParameters and return statementArguments vs ParametersFirst Class FunctionsAnonymous Function1 Comment
Sort: