You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the behavior should be same as Math.max.apply(Math, list.toArray()) which is not order-dependent. So thanks for pointing out this discrepancy.
However, I'm not sure that NaN and friends should be ignored. NaN has significance when used in math operations - the result of a math operation in which NaN is an argument should always produce NaN. It's a way of bubbling error conditions up through nested operations.
It does not behave as expected:
It would be really handy if NaN/null/undefined be ignored by max/min.
thanks.
The text was updated successfully, but these errors were encountered: