return arr.map(function(x){return x.substr(0,1).toUpperCase()+x.substr(1).toLowerCase();});
赞!代码简洁漂亮。
Sign in to make a reply
你以为那是谁
return arr.map(function(x){return x.substr(0,1).toUpperCase()+x.substr(1).toLowerCase();});