Here you can find the source of right(count)
String.prototype.right = function(count) { var result = ""; var stringLength = this.length; if (count > stringLength) { count = stringLength;// w w w. j a v a 2 s . com } var startIndex = stringLength - count; var i; for (i = startIndex; i < stringLength; i += 1) { result += this[i]; } return result; };
String.prototype.right = function(count) { if (count >= this.length) { return this.toString(); }else { return this.slice(this.length - count); };
String.prototype.right = function (count) { return this.substring(this.length - count);
String.prototype.right = function(count) { if (count > this.length) return this.toString(); return this.substring(this.length - count, this.length); };
String.prototype.right = function(i){ if(i>=0) return this.slice(-i); return this.slice(0, i); };
String.prototype.right = function(n) { return this.substr((this.length-n),this.length); };
String.prototype.right = function(n) { return this.slice(this.length - n);