is there a better way than performance.now() to tell how long the execution took?
is there like a 1 line solution i think i saw someone who did it once but i can't remember but is there a way to know how long something took to execute but in a faster way than these 4 lines or 3 if we dont console log start?
let start = performance.now();
console.log(start);
console.log("hello"); let timeTaken = performance.now() - start;
console.log("hello"); let timeTaken = performance.now() - start;
7 Replies
there is
console.time("label")
console.timeEnd("label")
oh
did not give me anytime
it could be that the console of jsfiddle does not output correcty (beta).
but when you open the console in the browser, it should show
oh ty
❤️