Answers for "how to check if a number is not in a 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 if a number is not in a javascript array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language