📜  包括不工作 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:56.691000             🧑  作者: Mango

代码示例1
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