console.time();
for (i = 0; i < 100000; i++) {
// some code
}
console.timeEnd();
// console.time
// This method is used to measure time. For example,
// checking how many seconds it went to complete the x task?
console.time("test");
setTimeout(() => {
console.timeEnd("test");
}, 1000);
// This will give us the following result:
// test: 1.000s