If you want to check how long a function runs you can use this approach in your program.
const start = performance.now();
const end = performance.now();
const total = start - end
console.log("function takes" + total + "mileseconds");
If you want to check how long a function runs you can use this approach in your program.
const start = performance.now();
const end = performance.now();
const total = start - end
console.log("function takes" + total + "mileseconds");