DEV Community

Francisco Imanol Suarez
Francisco Imanol Suarez

Posted on

How to check if a JavaScript array contains a specific value πŸ€”

If this is possible and is very easy to do in Javascript, for this we will use the includes () method

method includes()

Given a array, the includes () method determines if a specific element is found in that array, in the case that this element is found to be true and in the case that it is not, it would return false.

For example:

Alt Text

Thanks

If the article you liked or you found interesting, please help me with πŸ‘ πŸ€“ You can follow me on Twitter or find me on GitHub by visiting my website.

Top comments (0)