Javascript String right(i)

Description

Javascript String right(i)


String.prototype.right = function(i){
 if(i>=0) return this.slice(-i);
 return this.slice(0, i);
};



PreviousNext

Related