Answers for "pass anonymous functions as function argument js"

2

We often use anonymous functions as arguments of other functions. For example:

setTimeout(function () {
    console.log('Execute later after 1 second')
}, 1000);Code language: JavaScript (javascript)
Posted by: Guest on May-01-2021
0

anonymous function parameters javascript

function caller(otherFunction) {
     otherFunction(2);
 }
caller(function(x) {
    console.log(x); 
});
Posted by: Guest on August-01-2021

Code answers related to "pass anonymous functions as function argument js"

Browse Popular Code Answers by Language