js字符串数组['1','2','3']转number

let arr = ['1','2','3'];
arr.split(',').map(Number);

猜你喜欢

转载自www.cnblogs.com/lanshu123/p/11114540.html