Script variable shortcut

Repost because i posted the other one at the wrong forum part

Hey people,

Ive been wondering if it is possible to instead of having a conditional branch script variable be excessively replicated like this:
$gameVariables.value(11) === 2 || $gameVariables.value(11) === 4 || $gameVariables.value(11) === 9
If it could also be shorter like for example have it like these:
$gameVariables.value(11) === 2,4,9
$gameVariables.value(11) === 2 || 4 || 9
Or something else which would get rid of excessive text.
In case its not clear, i want to basically only write down one variable and have it respond to multiple random values. instead of having to repeat the same variable over and over, and get a long and hard to trace script.

Thanks in advance 🙂
Are you talking about using this in a plugin or a script call within an event? I'm just trying to determine if this should stay here or be in Plugin Support.
You can do it the other way around - make a list of numbers and check if the variables value is contained in it:
Code:
[2,4,9].contains($gameVariables.value(11))
Are you talking about using this in a plugin or a script call within an event? I'm just trying to determine if this should stay here or be in Plugin Support.
i meant it as a script within a conditional branch.
What @LadyBaskerville send worked like a charm. it was exactly what i was looking for. Thanks! you helped me yet again 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/script-variable-shortcut.81379/