Date – getSeconds()
date.getSeconds()
getSeconds()
returns the seconds of this date
object
Examples
1. get the seconds from current date
let date = new Date();
console.log(date);
console.log(date.getSeconds());
date.getSeconds()
getSeconds()
returns the seconds of this date
object
1. get the seconds from current date
let date = new Date();
console.log(date);
console.log(date.getSeconds());
Copyright @2022