["2","0","1","9"].map(parseInt)

arr.map(function(){

// 做一些处理

})

["2","0","1","9"].map(parseInt) 等价于

["2","0","1","9"].map((value,index,array) => parseInt(value,index));

parseInt(string,radix));第二个参数指名是几进制数

猜你喜欢

转载自blog.csdn.net/qq_41831345/article/details/87090613
今日推荐