JavaScript menjalankan sesuatu setelah x detik

setTimeout(function(){
  location.reload();
}, 3000); //run this after 3 seconds
SantiBM