Anonymous function is a function declared without any name. There are different way of declaring anonymous function.
Generally normal function get declared as
Referenced Anonymous Function:
An unnamed function referenced by variable is called Referenced Anonymous function. Given is an example of Referenced Anonymous function.
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.
Pros and Cons of Anonymous function can be found from stackoverflow
Keep Reading and Keep learning.