DEV Community

Discussion on: How to create range in Javascript

Collapse
 
bryistheguy profile image
Bryan Ryan

The for loop is by far the easiest to read and also by far the most efficient. Your last example was literally more than 15 times slower than the for loop. Far too many developers these days are trying to get all fancy when the simple solution is much better.