sorted
Return
a new collection with the same elements as the original, sorted
Parameters
from
- Likely named
collection to sort
by
- Optional
- Likely named
optional sorting function. If not provided, the collection is sorted by its natural order.
Throws
if the elements, or the properties supplied by by, cannot be compared