1let storyWords = ['extremely', 'literally', 'actually', 'hi', 'bye', 'okay']
2let unnecessaryWords = ['extremely', 'literally', 'actually' ];
3
4let betterWords = storyWords.filter(function(word) {
5 return !unnecessaryWords.includes(word);
6});
7console.log(betterWords) // ['hi' 'bye' 'okay]
1if (new RegExp(substrings.join("|")).test(string)) {
2 // At least one match
3}
4