Answers for "get if there is a value in an array node js"

10

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 "get if there is a value in an array node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language