Discuss / JavaScript / 作业

作业

Topic source

Niko

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

第一题

    return arr.reduce(function (x, y) {

    return x * y;

});

第二题

return s.split("").map(

     function( x ){return  x* 1 }).reduce(

          function( x , y ){return x * 10 + y }

);

第三题

return  arr.map((item) => item.charAt(0).toUpperCase() + item.slice(1).toLowerCase());

第四题

r = arr.map(Number);


  • 1

Reply