Using setTimeout for Delayed Function Execution in Javascript


Execute a function after a specified delay.

Source Code

setTimeout(function() {
  console.log("This message is shown after 3 seconds.");
}, 3000);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments