From 383d9fad746ae8de1050db5f6abde64fb5a7889c Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Mon, 28 Nov 2022 23:04:21 +0000 Subject: [PATCH] fix(range): step documentation Fix the documentation for range step which changed behaviour in 1.10 to automatically set step to -1 if start is after stop. --- index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index c23d79a4e..5b12f4352 100644 --- a/index.html +++ b/index.html @@ -1463,12 +1463,10 @@

Array Functions


A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted, - defaults to 0; step defaults to 1. Returns a list + defaults to 0; step defaults to 1 if start + is before stop, otherwise -1. Returns a list of integers from start (inclusive) to stop (exclusive), - incremented (or decremented) by step. Note that ranges that - stop before they start are considered to be zero-length - instead of negative — if you'd like a negative range, use a negative - step. + incremented (or decremented) by step.

 _.range(10);