javascript string prototype

Solutions on MaxInterview for javascript string prototype by the best coders in the world

showing results for - "javascript string prototype"
Jana
29 Jul 2019
1/* String prototype all built-in methods:
2 * developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
3 * -------------------------------------------------------------------------
4 */
5
6// Example for *extending* the String prototype
7String.prototype.reduce = function () { 
8    return this.split().reduce(...arguments);
9}