Im really new to this. I want this js to update every scond so it acts like a clock or to display time
Maybe using setInterval? I dont know how to do that
Here's my code
Ignore the bahasa language on my code
date = new Date();
menit = date.getMinutes();
jam = date.getHours();
hari = date.getDay();
tanggal = date.getDate();
bulan = date.getMonth();
tahun = date.getFullYear();
document.write(tanggal+" "+arrbulan[bulan]+" "+tahun+"<br>"+jam+" : "+menit);