Skip to content
doubtly

1 answer

Best answer

It is a function that has no name. These functions are declared dynamically at runtime using the function operator instead of the function declaration. The function operator is more flexible than a function declaration. It can be easily used in the place of an expression. For example:

var display=function()
{
  alert("Anonymous Function is invoked");
}
display();
 
MrRam · 9 Oct 2022 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.