It doesn't work as well with larger collections.
Personally, it makes most sense in a standard library module
On Wed, Nov 21, 2018 at 00:43 Michael Luder-Rosefield <
rosyatran...@gmail.com> wrote:
> > Math.min() method doesn't work on Arrays right out of the box.
>
> No, but rest parameters work
> Math.min() method doesn't work on Arrays right out of the box.
No, but rest parameters work: Math.min(...arr) is fine, and works with Sets
too.
On Wed, 21 Nov 2018 at 14:08 Isiah Meadows wrote:
> Not sure these belong in the standard library itself. I could see max and
> min being there (th
Not sure these belong in the standard library itself. I could see max and
min being there (these are very broadly useful), but the others, not so
much. I'd also like both max and min accept an optional comparison callback
of `(a, b) => a < b`. But the rest seem too narrowly useful IMHO.
On Tue, Nov
The array object has no method for finding the minimum value of an array of
numbers and the Math.min() method doesn't work on Arrays right out of the
box. I'll have similar issues if i wanted to return the maximum number, the
mean, mode, median or standard deviations in any array of numbers.
This
4 matches
Mail list logo