how to get currenct time in js code example
Example 1: javascript timestamp in seconds
const ts = () => Math.floor(new Date().getTime() / 1000);
Example 2: js get time in am
var time = new Date();
console.log(
time.toLocaleString('en-US', { hour: 'numeric', hour12: true })
);