// setTimeout() Method in javascript function setTimeoutFunction() { setTimeout(function(){ console.log("This message will display after 5 seconds"); }, 5000); } setTimeoutFunction();