Answers for "comtains array js"

4

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)
Posted by: Guest on October-13-2021
1

array.contains javascript

var boolValue = array.includes(item);
Posted by: Guest on October-08-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language