Multiple if checks to 1 variable
Is there another way to code this? Comparing a variable (var1) to multiple values.
if(var1 != array[0] && var1 != array[1] && var1 != array[2]) {}
Is there some other way to code that? Like if(var1 != (array[0] && array[1] && array[2]) ) {}
I know that doesn't work, but is there another way to code it?
