Define anonymous function in JavaScript

Forums JavaScriptDefine anonymous function in JavaScript
Staff asked 2 years ago

Answers (1)

Add Answer
Nayan Raval Marked As Accepted
Staff answered 2 years ago

It’s a function that doesn’t have a name. Instead of utilizing the function declaration, these functions are declared dynamically at runtime using the function operator. A function declaration is more rigid than a function operator. It can simply be substituted for a phrase. Consider the following scenario:

var display=function()  
{  
  alert("Anonymous Function is invoked");  
}  
display();

 

Subscribe

Select Categories