Skip to main content

Command Palette

Search for a command to run...

Types of Functions in JS

Updated
1 min read
Types of Functions in JS
M

A Software Engineer with a passion to convert challenging business needs into winning software solution and special interest in emerging Web & Mobile technologies.

In general, functions are "subprograms" that can be called from code outside (or inside, in the case of recursion) of the function. Like the program itself, a function consists of a series of statements called the function body. Values ​​can be passed as parameters to functions and functions return values.

In JavaScript, functions are first-class objects, because they can be passed to other functions, returned from functions, and assigned to variables and properties. They can also have properties and methods just like any other object. What distinguishes them from other objects is that functions can be called.

Here are some types of functions in javascript.