Given some randomly arranged array of day strings:
var days = ['Tues', 'Thur', 'Mon', 'Wed']
with days[0] = 'Tues', days[1] = 'Thurs', etc. After sorting, we get
sortedDays = ['Mon', 'Tues', 'Wed', 'Thur']
However, I'd like to reference the indices of the newly-sorted array to the old array, i.e., the old array has indices (0, 1, 2, 3) while the new array has indices (2, 0, 3, 1).
I have no idea on how to achieve this.