Discuss / JavaScript / liuxia dianshenme

liuxia dianshenme

Topic source

心影留踪

#1 Created at ... [Delete] [Delete and Lock User]

// 求积 return arr.reduce(function (x,y){return x * y;});

// string2int 函数 return arr.split('').map(function (x){ return +x;}).reduce(function (x,y){return x * 10 + y;});

//英文名字格式化 return arr.map(function (name) {return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();});

//小明的代码怎么了? r = arr.map(function(x){return parseInt(x)}); //


  • 1

Reply