Skip to content

Commit d122213

Browse files
authored
Merge pull request #2978 from stevenh/fix/range-step-docs
fix(range): step documentation
2 parents 7860d11 + 383d9fa commit d122213

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,12 +1463,10 @@ <h2 id="arrays">Array Functions</h2>
14631463
<br />
14641464
A function to create flexibly-numbered lists of integers, handy for
14651465
<tt>each</tt> and <tt>map</tt> loops. <b>start</b>, if omitted,
1466-
defaults to <i>0</i>; <b>step</b> defaults to <i>1</i>. Returns a list
1466+
defaults to <i>0</i>; <b>step</b> defaults to <i>1</i> if <b>start</b>
1467+
is before <b>stop</b>, otherwise <i>-1</i>. Returns a list
14671468
of integers from <b>start</b> (inclusive) to <b>stop</b> (exclusive),
1468-
incremented (or decremented) by <b>step</b>. Note that ranges that
1469-
<b>stop</b> before they <b>start</b> are considered to be zero-length
1470-
instead of negative — if you'd like a negative range, use a negative
1471-
<b>step</b>.
1469+
incremented (or decremented) by <b>step</b>.
14721470
</p>
14731471
<pre>
14741472
_.range(10);

0 commit comments

Comments
 (0)