CodesJava

Easy learning with example program codes

JavaScript JS Date getUTCSeconds() method


The JavaScript date getUTCSeconds() method is used to get the integer value between 0 and 60 that represents the seconds on the basis of universal time.

Syntax:

dateObj.getUTCSeconds()

Example:

<!DOCTYPE html>
<html>
<body>
<script>   	 
var today = new Date(); 	 
document.writeln(today.getUTCSeconds());   
</script>  
</body>
</html>

Output:

23
Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki