execute code by 1 seconds javascript code example
Example 1: javascript wait 1 second
setTimeout(function(){
console.log("Ready")
}, 1000);
Example 2: run js function after some sec
function myClick() {
setTimeout(
function() {
document.getElementById('div1').style.display='none';
document.getElementById('div2').style.display='none';
}, 5000);
}