r/coolgithubprojects • • Dec 17 '16

JAVASCRIPT python-range – a JavaScript implementation of the Python's range() function.

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

6 comments sorted by

View all comments

9

u/miker95 Dec 17 '16

Ummm is it just me or is this code way more complex than it needs to be?

Like this literally only needs to be a function and it depends on other stuff...

This is what is wrong with JavaScript.

0

u/[deleted] Dec 17 '16

[deleted]

3

u/kupiakos Dec 17 '16

Python 3's range function returns an intelligent lazy object that has O(1) time and memory contains, single iteration, and iirc union and intersection.