Measure execution time of a function using javascript

You can measure the performance of javascript code using console.time() function. This can be helpful in debugging and optimizing code which is taking lot of memory. console.time() can be used with console.timeEnd(). console.timeEnd() function tells console to stop calculating the time. You will see result as below: Running loop :0 timesRunning loop :1 timesRunning loop […]

Measure execution time of a function using javascript Read More »