Anonymous Functions
-> define variable then function
Ex.- !) Without parameter....
ver kamal = function(){
console.log("Its a anontmous function");
}
kamal() ///call functions
!!) With parameter...
var kamal = funtion(a,b){
var c = a+b
console.log("The value of c is : "+c)
}
kamal(5,5) //call functions
OUTPUT - The value of c is :10
NOTE: There is no name infront of function thats why its a anonymous function.
No comments:
Post a Comment