The getMinutes()
method returns the minutes of a date as a number (0-59):
Example
const d = new Date();
document.getElementById("demo").innerHTML = d.getMinutes();
document.getElementById("demo").innerHTML = d.getMinutes();
Practice Excercise Practice now