A function that is declared without any named identifier is known as an anonymous function. In general, an anonymous function is inaccessible after its declaration.
Anonymous function declaration –
1
2
3
4
5
6
7
|
varanon=function(){
alert('I am anonymous');
};
anon();
|