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.htmljavascript