Wednesday 9 February 2022

Nodejs - Anonymous Functions

 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

Kotlin - Observer

 Rxjava -  Observer - Based on data view willl render (react) karega. trotling -> making stream for execution (Means clicks event fire kr...