Science, asked by manjotk4514, 1 year ago

What is anonymous function in javascript?

Answers

Answered by Saharshthegreat
0
An anonymous function is a function that was declared without any named identifier to refer to it. As such, an anonymous function is usually not accessible after its initial creation
Answered by Anonymous
1

Hi

A function expression without name is called anonymous function


for example:


const logMyName = function () {

console.log('Ajay');

};


In above example we are storing the function expression in `logMyName` variable. So now we can execute tha function with the help of that variable so there is no to add a name to function.

Similar questions