function tick() { //get the mins of the current time var mins = new Date().getMinutes(); if (mins == "00") { alert('Do stuff'); } console.log('Tick ' + mins); } setInterval(tick, 1000);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter