Skip to main content

Types of Functions in JS

Updated 1 min readMarkdown
Part of seriesFunctions in Javascript
Types of Functions in JS

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.

About the author

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

No comments yet. Be the first to comment.