Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
}
 
PREVIOUS NEXT
Tagged: #array #node #js
ADD COMMENT
Topic
Name
1+6 =