Javascript String calcLength()

Description

Javascript String calcLength()


"use strict";/*  w  w  w . j  a  v  a2 s  . co m*/

// extension methods:

String.prototype.calcLength = function() {
    return this.length;
}

console.log("hello".calcLength());



PreviousNext

Related