get current time in java script code example
Example 1: js get date in ms
Date.now() // 1602680486141
Example 2: get time in javascript
//HTML
<a onclick="timeNow(test1)" href="#">SET TIME</a>
//Javascript
function timeNow(i) {
i.value = new Date()
}