check time taken to complete action javascript code example
Example: time taken for a function javascript
console.time("timer"); //start time with name = timer
console.timeEnd("timer"); //end timer and log time difference
console.time("timer"); //start time with name = timer
console.timeEnd("timer"); //end timer and log time difference