function timeout code example
Example 1: settimeout jquery
setTimeout(function(){ alert("Hello"); }, 3000);
Example 2: javascript settimeout
setTimeout(function(){
alert("Sup!");
}, 2000);
Example 3: timer in javascript
var timeout = setTimeout(function(){yourFunction()},10000);
var interval = setInterval(function(){yourFunction()},1000);
Example 4: javascript settimeout
window.setTimeout(()=>{
console.log('1 second passed!');
}, 1000);
Example 5: javascript set timeout
var timeToWait = 3000;
setTimeout(() => {
console.log("Text printed after 3 seconds");
}, timeToWait);