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.
When you copy an array using the assignment operator (equal sign) and you modifiy the copied array you mutate/modify the original array as well.
If you don't want to modify the original array it's best to use spread syntax (other options as well to do this)
In our case, he assinged the a,b,c in an [array] first and secondly he assigned the value of running [sort] through it thus what's on the left will be exactly to what's on the right.
So when he returns [a and b] he knows that a trianlge can only have 3 lengths and they're the shortests.
Hope that answered your questions, let me know if you need clarification.
This comment is hidden because it contains spoiler information about the solution