The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds .
Tip: 1000 ms = 1 second.
Tip: The function is only executed once. If you need to repeat execution, use the setInterval() method.
Tip: Use the clearTimeout() method to prevent the function from running.
Syntax settimeout
setTimeout(function, milliseconds, param1, param2, …)
Display an alert box after 3 seconds (3000 milliseconds)
setTimeout(function(){ alert("Hello"); }, 3000);
Very interesting topic, thankyou for posting.