MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/b2o6f2/whats_your_favorite_most_useful_javascript/eiv3bex
r/javascript • u/Linux_is_awesome • Mar 18 '19
422 comments sorted by
View all comments
Show parent comments
3
Not a thing in JS.
-1 u/Michie1 Mar 19 '19 Wow, you are right. Math.sum is not a function. I'm confusing it with Math.min/max and was extrapolating it would exist for sum.The following package should work:import * as math from 'mathjs'; math.sum(arr);
-1
Wow, you are right. Math.sum is not a function. I'm confusing it with Math.min/max and was extrapolating it would exist for sum.
Math.sum is not a function
The following package should work:
import * as math from 'mathjs'; math.sum(arr);
3
u/NoInkling Mar 19 '19
Not a thing in JS.