You are viewing a single comment's thread. Return to all comments →
If you're using ES6 syntax, you can simply use spread operator within Math.max and Math.min functions' argument like this:
Math.max
Math.min
Math.min(...arr); Math.max(...arr);
No need to use ugly apply :\
apply
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
If you're using ES6 syntax, you can simply use spread operator within
Math.max
andMath.min
functions' argument like this:No need to use ugly
apply
:\