Javascript String startsWith(pattern)

Description

Javascript String startsWith(pattern)


String.prototype.startsWith = function(pattern) {
  return this.indexOf(pattern) === 0;
};



PreviousNext

Related