This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Dates

The getSeconds() Method

Return the seconds of a date as a number (0-59):

const d = new Date();
document.getElementById("demo").innerHTML = d.getSeconds();