anonymous function can be pass as the argument code example
Example: 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)