Is there a javascript method to find substring in an array of strings?

前端 未结 5 1217
醉话见心
醉话见心 2021-01-26 08:58

Suppose my array is [\"abcdefg\", \"hijklmnop\"] and I am looking at if \"mnop\" is part of this array. How can I do this using a javascript method?

I tried this and it

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-26 09:35

    Can be done like this https://jsfiddle.net/uft4vaoc/4/

    Ultimately, you can do it a thousand different ways. Almost all answers above and below will work.

    
    

提交回复
热议问题