January 2020
Intermediate to advanced
470 pages
11h 13m
English
In the same vein as the preceding filtering problem, let's revisit the sorting problem from the Injection – sorting it out section of Chapter 3, Starting Out with Functions – A Core Concept. Here, we wanted to sort an array with a specific method. Therefore, we used .sort(), providing it with a comparison function that basically pointed out which of the two strings should go first. To refresh your memory, given two strings, the function should do the following:
Let's go back to the code we looked at for sorting in Spanish. We had to ...
Read now
Unlock full access