The JavaScript date getUTCSeconds() method is used to get the integer value between 0 and 59 that represents the seconds on the basis of universal time.
Syntax:
dateObj.getUTCSeconds()
Return:
An integer value between 0 and 59.
Example:
<!DOCTYPE html> <html> <body> <script> var today = new Date(); document.writeln(today.getUTCSeconds()); </script> </body> </html>