getSeconds()
Returns the date's seconds as a number between 0 and 59.
getSeconds() |
Yes | Yes | Yes | Yes | Yes |
dateObject.getSeconds();
None
return a number, from 0 to 59, representing the seconds.
var myDate = new Date();
console.log(myDate.getSeconds());
The code above generates the following result.