[removed] indexOf vs. Match when Searching Strings?

前端 未结 9 1568
感情败类
感情败类 2020-12-04 13:16

Readability aside, are there any discernable differences (performance perhaps) between using

str.indexOf("src") 

and



        
9条回答
  •  眼角桃花
    2020-12-04 13:25

    remember Internet Explorer 8 doesnt understand indexOf. But if nobody of your users uses ie8 (google analytics would tell you) than omit this answer. possible solution to fix ie8: How to fix Array indexOf() in JavaScript for Internet Explorer browsers

提交回复
热议问题