The setTimeout() method in JavaScript
If you want to run something once after a set time use setTimeout()
Set Timeout
setTimeout() is a window method available to us. It takes two things:
A callback function
Time in milliseconds
setTimeout(() => {
console.log('1 second!');
}, 1000);
...
davidbell.hashnode.dev2 min read