FrontendDeveloper.in

JavaScript question detail

What is the use of setTimeout

The setTimeout() method is used to call a function or evaluate an expression after a specified number of milliseconds. For example, let's log a message after 2 seconds using setTimeout method,

setTimeout(function () {
console.log("Good morning");
}, 2000);
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399