Home » JavaScript Date getUTCSeconds() Method

JavaScript Date getUTCSeconds() Method

by Online Tutorials Library

JavaScript Date getUTCSeconds() method

The JavaScript date getUTCSeconds() method returns the seconds for the specified date on the basis of universal time.

Syntax

The getUTCSeconds() method is represented by the following syntax:

Return

An integer value between 0 and 59 that represents the second.

JavaScript Date getUTCSeconds() method example

Here, we will understand getUTCSeconds() method through various examples.

Example 1

Let’s see an example to print the value of current second according to universal time.

Test it Now

Output:

Seconds Value : 51  

Example 2

Let’s see an example to print the value of seconds from the given date according to universal time.

Test it Now

Output:

Second value1 : 30  Second value2 : 50  
Next TopicJavaScript Date

You may also like