console.time and console.timeEnd

You can use console.time and console.timeEnd to measure the time it takes to do stuff in JavaScript