Answers for "how to check if a aray have a the value js"

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 aray have a the value js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language