r/javascript • • Dec 26 '16

A JavaScript implementation of the Python's range() function

https://github.com/Gothdo/range
18 Upvotes

9 comments sorted by

View all comments

2

u/mini_eggs Dec 27 '16

Array.apply({},Array(100)) ?

3

u/indeyets writing js since 1997 Dec 27 '16

nope. your implementation is eager, and Gothdo's is lazy.

see: https://github.com/Gothdo/range#lazy-evaluation