setTimeout(function(){
location.reload();
}, 3000); //run this after 3 seconds
setTimeout(function() {
//whatever you want to execute
}, amountOfSeconds * 1000); //executes after amountOfSeconds seconds
//with defined function
setTimout(functionName, amountOfSeconds * 1000);
//example
setTimeout(function() {
console.log("It has been 3 seconds.");
}, 3000);
setTimeout(
function() {
document.getElementById('div1').style.display='none';
document.getElementById('div2').style.display='none';
}, 5000);