Anonymous Function Pass as Argument and Return in Javascript

 Anonymous Function Pass as Argument and Return in Javascript


In this article we are goanna to see about Anonymous Function Pass as Argument and Return in Javascript and where we use these. which is most important when you are going to start your career in JavaScript. Please ready and enjoy this article if you want to give any feedback about your experience, we welcome.



Ex pass as argument:

function myfun(fun1){

fun1();

}

myfun(function ( ) {

document.write(“Hello word”);

});

Ex pass as return:

function myfun(){

return function ( ) {

document.write(“Hello word”);

};

};

myfun()();


Share:

0 comments

Please leave your comments...... Thanks