Discuss / JavaScript / 练习三

练习三

Topic source

hi54yt

#1 Created at ... [Delete] [Delete and Lock User]
return arr.map(function(x){
  var y = '';
  for(var i=1; i<x.length; i++){
    y = y + x[i]
  }
  return x[0].toUpperCase() + y.toLowerCase()
})

  • 1

Reply