What is an anonymous function in Javascript ?

Total Post:55

Points:275

 223  View(s)
Ratings:
Rate this:
  1. What is an anonymous function in Javascript ?

    This is a function that has no name or without a name. These type of functions are declared dynamically at runtime using the function operator instead of the function declaration. A 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();  

Answer