I have a mixed array that I need to sort by alphabet and then by digit
[A1, A10, A11, A12, A2, A3, A4, B10, B2, F1, F12, F3]
我如何将其排序为:
[A1, A2, A3, A4, A10, A11, A12, B2, B10, F1, F3, F12]
我试过了
arr.sort(function(a,b) {return a - b});
but that only sorts it alphabetically. Can this be done with either straight JavaScript or jQuery?