Answers for "includes not working"

0

includes not working

String.prototype.includes = function (str) {
  var returnValue = false;

  if (this.indexOf(str) !== -1) {
    returnValue = true;
  }

  return returnValue;
}
// no need to do anything. Just put this at the top of your code, and call string.includes("") like
// normal on IE
Posted by: Guest on June-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language