const Arr = ["1115.1","12.5","100.1"] function sortArr (){ const delArr = [] Arr.forEach((items,index) =>{ let a = { salesVolume: parseFloat(items), // 销量 month:index + 1 + "月" // 月份 } delArr.push(a) }) delArr.sort((a,b) =>{ return a.salesVolume - b.salesVolume }) console.log(delArr) } sortArr()