Category JavaScript

Recursion in JavaScript (with Examples)

Recursion in JavaScript

Recursion in JavaScript is a process of invoking itself. A function that calls (invokes) itself is called recursive function. In other words, a program in which a function invokes itself is called recursion, and the related function is called a…

Anonymous Functions in JavaScript

In JavaScript, it is also possible to create anonymous functions. An anonymous function in JavaScript is a type of function that doesn’t have a name after the function keyword. The term ‘anonymous’ means something that is unknown or has no…

Objects in JavaScript (with Examples)

JavaScript object example

We know JavaScript is a simple object-based language. Everything is an object in JavaScript. An object in JavaScript is an entity or any real-world thing that has a state and behavior. Here, the state represents properties (characteristics) of an object…

Rest Parameter in JavaScript

Rest parameter is an important feature provided by JavaScript. It allows us to send an arbitrary (indefinite) number of arguments to a function in the form of an array. It is suitable in scenarios where the number of input parameters…