Skip to content
Advertisement

How to check if the exact words contained in an array are present in a string in Javascript [closed]

Hi I would like to know how to check if the exact words contained in an array in Javascript are present in a string, like this

JavaScript

this should be true

Advertisement

Answer

As stated by @jabaa, you can use every and includes:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement