Discuss / JavaScript / Answer

Answer

Topic source

NotFatCat

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

return arr.map(function(name){ return name.split("").map(function(s,index){ return index===0?s.toUpperCase():s.toLowerCase();
}).reduce(function(x,y){return x+y;}).toString(); });


  • 1

Reply