The JavaScript date setUTCSeconds() method sets the second value for the particular date on the basis of universal time.
Syntax:
dateObj.setUTCSeconds(new_seconds);
Parameters:
new_seconds: Integer value between 0 to 59.
Example:
<!DOCTYPE html> <html> <body> <script> var today =new Date(); document.writeln(today.getUTCSeconds()+"<br>"); today.setUTCSeconds(40); document.writeln(today.getUTCSeconds()); </script> </body> </html>