Test code performance

by Viet27th

JavaScript

// Recommended way
const start = performance.now();

// Code here

console.log(performance.now() - start);


/* // Another way
const start1 = new Date().getTime();

// Code here


console.log((new Date().getTime()) - start); */