Google News
logo
UI Developer - Interview Questions
Define the Anonymous function in JS?
Generally, the function name is defined when we define the function itself, in normal user-defined functions, but in the case of an anonymous function, the function name is not defined. Here we make use of an assignment operator and variable to stow the function as an object, then utilizing that variable, we will be capable to invoke the function itself.
 
Example :
var add = function(a,b){consol.log(a+b)}
add(4,5);   //9
Advertisement