I have two different arrays. One array, a, for a list of people. My other array, b, for a list of their ages. I go to sort b by number and then reverse it so it goes in descending order. I got to this part okay.
How do I sort a (a list of people's names) so that the same values are still paired up with the sorted list?
Example:
a contains Bob, Sue, Phil, and Jenny respectively
b contains 15, 12, 13, and 13 respectively.
I want my outcome to be:
a contains Bob, Jenny, Phil, and Sue respectively
b contains 15, 13, 13, and 12 respectively