Javascript String endsWith(end)

Description

Javascript String endsWith(end)


String.prototype.endsWith = function(end) {
  return this.indexOf(end) == this.length-end.length;
};



PreviousNext

Related