How fast is your code?

Niraj Shrestha
Nov 19, 2021


You ever wanted to know how long does a block of your code takes to execute? Well you have come to the right place.
You can simply wrap your block of code with console.time function to measure how long your code took to execute.

console.time("Label A")
let num = -999999
for(let i = 0; i < 99999; i++){
console.timeEnd("Label A")

Make sure to check out my other posts as well :)



Niraj Shrestha

Programming & Networking Enthusiast {Student}