数组里的字符串转为数字

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

  return +item;

});

//[1,2,3]

  

猜你喜欢

转载自www.cnblogs.com/youngboy-front/p/9076412.html