SOURCE

function count (str){
  let strArr=str.split('').reverse()
  let res=0
  res = strArr.reduce((total,item,i)=>{
      return total+(item.charCodeAt()-64) * Math.pow(26,i)
  },0)
  console.log(res-1)
  return res-1
}
count("BZ")
console 命令行工具 X clear

                    
>
console