Discuss / JavaScript / normalize

normalize

Topic source

function normalize(arr) { return arr.map(function (x){ return x.toLowerCase().split('').reduce(function(x, y){ if (x.length === 1){ return x.toUpperCase()+y; } else { return x+y; } }); }); }


  • 1

Reply