You can use console.time()
to start a timer to track how long an operation takes. Each timer must have a unique name.
When you call console.timeEnd()
with the same timer name, the browser will output the time in milliseconds that elapsed since the timer was started.