function str2int (){
return Array.prototype.map.call(s, x => x - 0).reduce((x,y) => x * 10 + y)
}
不使用Number或parseInt将字符串转换为数字
猜你喜欢
转载自blog.csdn.net/qaqLjj/article/details/84147301
今日推荐
周排行