get if there is a value in an array node js
snippet in javascript

get if there is a value in an array node js

user5010

myArray = Array(/*element1, element2, etc...*/);

// If the array 'myArray' contains the element 'valueWeSearch'
if(myArray.includes(valueWeSearch))
{
 	// Do something
}