js setTimeut code example
Example 1: js settimeout
setTimeout(() => { alert('Hello') }, 1000)
Example 2: javascript settimeout
window.setTimeout(()=>{
console.log('1 second passed!');
}, 1000);
setTimeout(() => { alert('Hello') }, 1000)
window.setTimeout(()=>{
console.log('1 second passed!');
}, 1000);