settimeout animation code example
Example 1: settimeout
// Run anonymous function after 5,000 milliseconds (5 seconds)
setTimeout(() => {
// Run code
}, 5000);
Example 2: settimeout
setTimeout(function(){
alert("Sup!");
}, 2000);//wait 2 seconds