"If statement" for switch on?

Hey!
How would I write an "if statement" in javascript that runs if a switch is on or not?
It would be in the "rpg_objects.js" file.
Thanks!
-Yitzi Litt
if ($gameSwitches.value(15)) {
...
}

would run if switch 15 is on
if ($gameSwitches.value(15)) {
...
}

would run if switch 15 is on
Thanks!
You just made my day!
You could just check Game_Interpreter to see what it does when you use a conditional branch to see if a switch is on, in an event.

I've moved this thread to Learning JS. Thank you.


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/if-statement-for-switch-on.84856/