getUTCSeconds()

Introduction

The getUTCSeconds() method returns the seconds, according to universal time (from 0-59. The following is the syntax for the getUTCSeconds() method.

obj.getUTCSeconds();

Example

The following is the code for the getUTCSeconds() method.

var obj = new Date(); document.write(obj.getUTCSeconds());

On running the above code, the following output is obtained.