这个问题要拆开来看1,字符串怎么转为数值(1)parseInt(x)和parseFloat(x)(2)Number(x)(3)各种隐式转换比如+x或者x*1等等2,怎么把数组中每个元素按照某个规则做转换(1)for循环每个进行转换(2)利用数组元素的map方法进行映射综上最简短的两种写法如下["1","2","3","4","5"].map(e=>+e)["1","2","3","4","5"].map(Number)