startsWith

mac2022-06-30  92

if (!String.prototype.startsWith) { Object.defineProperty(String.prototype, 'startsWith', { enumerable: false, configurable: false, writable: false, value: function (searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; } }); }//大拿拿了一个这样的代码出来,你妈,,吓死我了,,这不科学啊而且 this.indexOf(searchString, position) === position;这句感觉有问题

  

转载于:https://www.cnblogs.com/diligenceday/p/3741158.html

最新回复(0)