setTimeout(function(){
location.reload();
}, 3000); //run this after 3 seconds
const now = new Date();
now.setSeconds(now.getSeconds() + 1)
setTimeout(function () {
console.log('Hello world')
}, 1000)
setTimeout(() => {
console.log('Foo bar')
}, 1000)
Run code snippet
function closeAnimation() {
setInterval(function(){hide()}, 400);
clearInterval(stopAnimation);
}
var stopAnimation = setInterval({hide()}, 400);