Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140705

How to know if a string includes at least one element of array in Javascript

$
0
0
let theString = 'include all the information someone would need to answer your question'

let theString2 = 'include some the information someone would need to answer your question'

let theString3 = 'the information someone would need to answer your question'

let theArray = ['all', 'some', 'x', 'y', 'etc' ]

theString true because there is 'all', theString2 true because there is 'some', theString3 false because there is no 'all' or 'some'


Viewing all articles
Browse latest Browse all 140705

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>