getElapsedTime javascript code example
Example 1: javascript get current time
var today = new Date();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
Example 2: settimeout javascript
setTimeout(function(){
console.log("hello");
}, 3000); //wait for atleast 3 seconds before console logging