Bug with _.range() with a bad start point #683

yagudaev opened this Issue Jul 24, 2012 · 2 comments


None yet

3 participants


If you call _.range() or _.range("", 2000) or _.range(null, null) or _.range(null, 2000), underscore will return an very long array (almost infinite, but probably just reaches the limit of array size in javascript or on the machine) as such ["", "1", "11", "111", "1111", "1111", "11111"...].

This looks like a classic case of both concatenation of a string instead of addition ('' + 1) and an infinite loop.


btw, you might want to check out #634


Yep -- that's why you need to call range with numbers. We don't want to make this "work".

@jashkenas jashkenas closed this Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment