epoch unix js code example
Example 1: get epoch timestamp js
Math.floor(Date.now() / 1000)
Example 2: epoch time js
let nowInMs = Date.now();
let nowInSecond = Math.round(nowInMs/1000);
console.log(nowInSecond); //
Math.floor(Date.now() / 1000)
let nowInMs = Date.now();
let nowInSecond = Math.round(nowInMs/1000);
console.log(nowInSecond); //