I have an alphanumeric array that I need to sort by alphabet ascending and then by number descending, the array is a as follows:
[A1, A4, A2, A3, C2, C4, C3, B3, B5, B4]
How do I sort the array using JavaScript, so it looks like:
[A4, A3, A2, A1, B5, B4, B3, C4, C3, C2]
I have tried:
arr.sort()
but that only sorts it alphabetically and numerically ascending, giving me:
[A1, A2, A3, A4, B3, B4, B5, C2, C3, C4]