Easy Tutorial
❮ Met Canvas Closepath Prop Option Defaultselected ❯

JavaScript getSeconds() Method

JavaScript Date Object

Example

Returns the seconds according to local time:

n Output result:


Definition and Usage

The getSeconds() method returns the seconds of a time. The return value is an integer between 0 and 59.


Browser Support

All major browsers support the getSeconds() method.


Syntax

Return Value

Type Description
Number The return value is an integer between 0 and 59.

Technical Details

| JavaScript Version: | 1.0 | | --- | --- |


More Examples

Display Current Time


JavaScript Date Object

❮ Met Canvas Closepath Prop Option Defaultselected ❯