How to turn on switch if a variable is equal to many possible values

Hey there! I am trying to figure out how to turn on a switch if a variable is equal to a bunch of possible values? What I got so far is something like this...

So I have an event that sets variable 1 to the value of 115. And then I create the following script call:

var hs = [113, 114, 115, 116, 117];
if ($gameVariables.value(1) === hs) {
$gameSwitches.setValue(100, true);
}


So basically if variable #1 is equal to 113, 114, 115, 116, or 117, game switch 100 will turn on. I'm no programmer so I'm not entirely sure how to do this part exactly. I can do this through a bunch of conditional branches but what if variable 1 can be equal to lets say 1000 different numbers, then I'd have a bunch of conditionals 🙂 . Any help would be greatly appreciated! Thank you!!!!
PHP:
const isIn= [113, 114, 115, 116, 117].includes($gameVariables.value(1) )||false;
$gameSwitches.setValue(100, isIn);
Contains, not includes. Includes is present only from MV 1.6.0
I guess he uses 1.6, he does not say is the version!
A neater, shorter version :
Code:
$gameSwitches.setValue(switchID, [value1, value2, value3, etc].contains($gameVariables.value(variableID)))

or you can do it like this in case you want to do more :
eventing.JPG
Wicked! Thank you so much guys! This helped me in so many ways 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-turn-on-switch-if-a-variable-is-equal-to-many-possible-values.92928/