So this you might have been able to figure this out if you read my post on how to account for an IF statement that might have undefined variables but I had a situation where I wanted to check if an Array DID NOT INCLUDE a value in an IF statement to determine if I completed that expression. To do this I used (! b.includes(“312”) in my IF statement. See the sample below.

Example of an IF statement that checks if an Array does not include. 

I’m checking if the array doesn’t include “312” do determine if I

if ((a == 317 && publication == ‘test’ ) || (! b.includes(“312”) && publication != ‘test’ )) {
console.log(“hello world this array doesn’t include 312”)
console.log (‘hello world ‘)