ontimeout function js code example
Example 1: javascript set delay
var delayInMilliseconds = 1000; //1 second
setTimeout(function() {
//your code to be executed after 1 second
}, delayInMilliseconds);
Example 2: settimeout javascript
setTimeout(function(){
console.log("hello");
}, 3000); //wait for atleast 3 seconds before console logging