Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I did not know you can use "apply" on a function instead of the spread operator (...arr), TIL.
Gotta understand what "apply" does but it looks helpful
This comment is hidden because it contains spoiler information about the solution
The key to this technique is to pass in the Math Object as the first argument instead of null of apply() so that the "this" value is set appropriately. apply(Math, list);
Thanks for the awesome explanation!
Math.min or Math.max doesn't work on arrays, so we borrow it using function method .apply(). You need to pass two things for apply() to work, first is pointer to "this", we don't need it in this example so null, and second is values. Apply allows you to pass values as an array, unlike almost identical call().