check if item is not in array javascript code example
Example 1: 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
}
Example 2: see if array contains array javascript
const found = arr1.some(r=> arr2.indexOf(r) >= 0)