SOURCE

var array = ["B3","D2","F1","A9","D12","A2","C1","Z0","B1"]
var strIndexList = []
var strCodeList = []
for (item in array){
    var strIndex_init = array[item].split(/[A-Z]/i)
    var strIndex = parseInt(strIndex_init[1])
    strCodeList.push(array[item][0])
    strIndexList.push(strIndex)
}
console.log(strIndexList)
var i = 0
while(i<strIndexList.length){
    var j = 0
    while(j<strIndexList.length-i){
        var tempIndex = ''
        var tempCode = ''
        if(strIndexList[j]>strIndexList[j+1]){
            temp = strIndexList[j]
            tempCode = strCodeList[j]
            strIndexList[j] = strIndexList[j+1]
            strCodeList[j] = strCodeList[j+1]
            strIndexList[j+1] = temp
            strCodeList[j+1] =tempCode
        }
        else if(strIndexList[j]==strIndexList[j+1]){
            if(strCodeList[j]>strCodeList[j+1]){
                tempCode = strCodeList[j]
                strCodeList[j] = strCodeList[j+1]
                strCodeList[j+1] =tempCode
            }
        }
        j=j+1
    }
    
    i = i+1
}
var result = []
for (resultItem in strIndexList){
    var temp_result = strCodeList[resultItem] + strIndexList[resultItem]
    result.push(temp_result)
}
console.log(result)
console 命令行工具 X clear

                    
>
console