Niraj Shrestha

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++){
num++
}
console.log(num)
console.timeEnd("Label A")

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

--

--

Niraj Shrestha

Niraj Shrestha

Programming & Networking Enthusiast {Student}