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)
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)
anonymous function parameters javascript
function caller(otherFunction) {
otherFunction(2);
}
caller(function(x) {
console.log(x);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us