console.log("Executed now"); // 1 second delay setTimeout(function(){ console.log("Executed after 1 second"); }, 1000);