> Good point. Maybe all of these parameters should be options:
>
> Array.range() -> 0, 1, 2, 3, ...
> Array.range({ start: 3 }) -> 3, 4, 5, 6, ...
> Array.range({ end: 5 }) -> 0, 1, 2, 3, 4
> Array.range({ step: 3 }) -> 0, 3, 6, 9, ...
> Array.range({ start: -2, step: -1 }) -> -2, -3, -4, -5, ...
> etc.Why use a new syntax for a simple function call ? Afaik, there is no other standard function using an object for passing parameters, is it ? On 3 January 2012 18:42, Axel Rauschmayer <[email protected]> wrote: > I think it's fairly common for range implementations to provide an optional > `step` parameter > > > [...] > > The defaults of start and end and the comparison operator depend on the sign > of step. > > -- > Dr. Axel Rauschmayer > [email protected] > > home: rauschma.de > twitter: twitter.com/rauschma > blog: 2ality.com > > > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > -- Maël Nison Epitech 2014, Paris - Astek _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

