Stops a timer created by a call to
console.time() and writes the time elapsed since then.
Label used for the timer. required
console.time("assignments"); for (var i=0; i<1000000; i++) var a = 1; console.timeEnd("assignments");
This measures the time how long one million assignments in a for loop take and prints the result to the console. The call to
console.timeEnd("assignments") will stop the timer called "assignments" and print the elapsed time.