Answers for "how to check for a value not in javascript array"

9

get if there is a value in an array node js

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

// If the array 'myArray' contains the element 'valueWeSearch'
if(myArray.includes(valueWeSearch))
{
 	// Do something
}
Posted by: Guest on January-31-2021

Code answers related to "how to check for a value not in javascript array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language