JavaScriptDategetSeconds

Returns the seconds (0-59) in the specified date.

Syntax

date.getSeconds()

Example

Enter values below to update the example in real time.

const
new
console
getSeconds
const date = new Date();
console.log(date.getSeconds());   // current second (0-59)