数组里的字符串转为数字

['1','2','3'].map(function(item) {

  return +item;

});

//[1,2,3]

  或者javascript

["1", "2"].map(Number)
相关文章
相关标签/搜索