1:
return arr.reduce((x,y) => x*y);
2:
return s.split('').map((x) => x*1).reduce((x, y)=>x * 10 + y);
3:
return arr.map(x => x[0].toUpperCase()+x.substring(1).toLowerCase());
4:
//方法1 r = arr.map(Number);
//方法2 r = arr.map(str => parseInt(str));
牛啊,第二个太赞了!
Sign in to make a reply
BROMA丶
1:
2:
3:
4: