Javascript String addSuffix()

Description

Javascript String addSuffix()


// Built-In Function Constructors : 

String.prototype.addSuffix = function(){
  return this.toString() + 'mySuffix';
}

var a = new String('Neera');
console.log(a.addSuffix());/*from   w  w  w  . j a  va  2 s . c  om*/



PreviousNext

Related