DEV Community

Discussion on: What is faster then a FOR..Loop in JS?

Collapse
 
hgarr profile image
Heriberto Garcia Ribas
hgarr image

OMG of course! I was overthinking it indeed.
There is no need for a loop.

Math.floor(n/2)

From now on I will take on the Kata's with a different perspective!
Thanks Jeremy! :)