Loading…

What do you mean by Anonymous Function?

It is a function that was declared without any function named identifier to refer to it. It is usually not accessible after its initial creation. These functions are created at run time.

Example

                                        

It is a type of normal funtion used in Javascript
function helloFunction() {
   alert("Hello this is bestinterviewquestion.com");
}
helloFunction();

It is a type of anonymous function used in Javascript.
var helloFunction = function()
{
   alert("Hello this is bestinterviewquestion.com");
}
helloFunction();

Suggest An Answer

No suggestions avaliable!

Latest post from Front end Developer Interview Questions

Ask Question