How to check if lots of switches are simultaneously on?

Hi, everyone 😍

I'm making a "quest board" with missions the player can accept. I wanted it to show "no more quests to accept" when they're all taken and/or finished. I don't really know why, but just putting condicional within conditional isn't working, so I thought I'd come here and look for something simple that works. Any ideas?
Code:
function areAllSwitchesOn(v){for (var i = 0; i < v.length; i++){if (!$gameSwitches.value(v[i])){return false;}};return true;};
$gameSwitches.setValue(10, areAllSwitchesOn([1, 2, 5])); // This would set switch 10 to true only if 1, 2 & 5 are on.
Thank you very much! It seems to be working perfectly.
Thank you very much! It seems to be working perfectly.
No. Prob. Glad to help out. :popcorn:

Happy Game Making! ☺️

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-if-lots-of-switches-are-simultaneously-on.121841/