String.prototype.toJadenCase = function () {
return this.split(' ').map(function(value, index) {
let arr = value.split('');
let val = value[0].toUpperCase() + value.slice(1);
return val;
}).join(' ');
};
本文转载自:http://www.cnblogs.com/Uncle-Keith/p/6230918.html