练习1:reduce求积
return arr.reduce(function(x,y){ return x*y; });
练习2:string2int
s.split("").map(function(x){ return x - '0'; }).reduce(function(x,y){ return x*10 + y; });
练习3:规范输入
return arr.map(function(x){ return x[0].toUpperCase() + x.slice(1).toLowerCase(); });
练习4:改正小明错
r = arr.map(Number);
Sign in to make a reply
前路漫漫未来仍远
练习1:reduce求积
练习2:string2int
练习3:规范输入
练习4:改正小明错