Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js check if string includes from array

wordsArray = ['hello', 'to', 'nice', 'day']
yourString = 'Hello. Today is a nice day'.toLowerCase()
result = wordsArray.every(w => yourString.includes(w))
console.log('result:', result)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #check #string #includes #array
ADD COMMENT
Topic
Name
1+5 =