setTimeout(function () {
console.log('Execute later after 1 second')
}, 1000);Code language: JavaScript (javascript)
let printName = function (name) {
console.log('Hello ',name);
};
printName('Chandler Bing');
function caller(otherFunction) {
otherFunction(2);
}
caller(function(x) {
console.log(x);
});
setTimeout(function () {
console.log('Welcome to JavaScript world')
}, 1000);