includes not working

Solutions on MaxInterview for includes not working by the best coders in the world

showing results for - "includes not working"
Jack
19 Nov 2019
1String.prototype.includes = function (str) {
2  var returnValue = false;
3
4  if (this.indexOf(str) !== -1) {
5    returnValue = true;
6  }
7
8  return returnValue;
9}
10// no need to do anything. Just put this at the top of your code, and call string.includes("") like
11// normal on IE