Given an array a:
> var a = [3,2,1];
> a
< [3, 2, 1]
When mean is called:
the sort order of a is preserved:
However, when median is called:
the sort order of a is lost. a is mutated, and is now sorted ascending:
It this expected behaviour? If not, I can provide a PR with failing test. Thanks!
Given an array
a:When
meanis called:the sort order of
ais preserved:However, when
medianis called:the sort order of
ais lost.ais mutated, and is now sorted ascending:It this expected behaviour? If not, I can provide a PR with failing test. Thanks!