CodesJava

Easy learning with example program codes

JavaScript Date getUTCSeconds() method

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>

Output:

23
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status