0 votes
99 views
in Javascript by (2.0k points)
edited

Define anonymous function

1 Answer

0 votes
by (2.0k points)
selected by
 
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();
 

Related questions

0 votes
1 answer 145 views
asked Oct 9, 2022 in Javascript by MrRam (2.0k points)
+1 vote
0 answers 70 views
0 votes
1 answer 78 views
asked Aug 19, 2022 in Javascript by codelikepro (3.5k points)
0 votes
1 answer 100 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

535 users

...