how to get current unix epoch time in javascript code example Example: get current time epoch javascript var a = Date.now(); // Returns miliseconds since epoch