performance js code example
Example 1: performance javascript
const t0 = performance.now();
// doSomething();
const t1 = performance.now();
console.log(`Call to doSomething took ${t1 - t0} milliseconds.`);
Example 2: javascript performance
var i;
for (i = 0; i < arr.length; i++) {