1.

Explain anonymous functions in JavaScript with an example.

Answer»

Anonymous functions are the functions without any name. 

For example:

var avg = function()

var sum =

for (var i = 0, j = arguments.length; i < j; i++)

sum += arguments[i];

return sum / arguments.length; 

}



Discussion

No Comment Found

Related InterviewSolutions