Anonymous Functions

Anonymous function is a function declared without any name. There are different way of declaring anonymous function.
 
Normal Function
Generally normal function get declared as
  
function myFun(){
	console.log("Normal Function with name!!");
}
myFun();
 
Referenced Anonymous Function:
An unnamed function referenced by variable is called Referenced Anonymous function. Given is an example of Referenced Anonymous function.
 
var myRefFun = function(){
	console.log("Referenced Function!!");
}
myRefFun();
 
Anonymous function we mostly use as a parameter for callback function
 
Another way of creating anonymous function and calling it on the same time is.
   
(function (message){
	console.log(message); // Hello
})("Hello");
	
 
Pros and Cons of Anonymous function can be found from stackoverflow
 
Keep Reading and Keep learning.