getMinutes method
The getMinutes method is applied
to the date object
and returns the current minutes value
(a number from 0 to 59).
Syntax
date.getMinutes();
Example
Let's output the current number of minutes:
let date = new Date();
let res = date.getMinutes();
console.log(res);
See also
-
the
getHoursmethod
that gets the hours -
the
getSecondsmethod
that gets the seconds -
the
getMillisecondsmethod
that gets the milliseconds