1.

What is anonymous function in JavaScript with example?

Answer»

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.

Normal funtion

function helloFunction() {
    ALERT("Hello this is bestinterviewquestion.com");
}

ANONYMOUS function

var helloFunction = function()
{
    alert("Hello this is bestinterviewquestion.com");
}
helloFunction();



Discussion

No Comment Found