Question on porting a line of VXA Ruby to RMMV JS

Hello everyone. I'm working on porting a VX Ace Ruby plugin to RMMV JavaScript and came across the following line:
Ruby:
$game_self_switches[[@map_id, ev.id, PearlKernel::Enemy_Sensor]]

I don't have a lot of practice with Ruby, so I'm curious as to what this is specifically doing. Is the 3-element array acting as a key, or is it one of those Ruby quirks where it's choosing the first applicable index of the 3? And if so, does anyone with RMMV JS knowledge know whether or not $gameSelfSwitches allows for this?

Thanks!
It's using an array as a key, which MV also does. $gameSelfSwitches uses as its object key an array where the first element is the map ID, the second element is the event ID, and the third element is the letter. The only difference is that MV uses $gameSelfSwitches because the Javascript engines use camelCase instead of Ruby's underscores.
Great! I know the standard is different, but wasn't entirely sure on the functionality. Appreciate it!
Great! I know the standard is different, but wasn't entirely sure on the functionality. Appreciate it!
Nah, a lot of the internal stuff was kept surprisingly faithful to RGSS besides the change in naming conventions. Functionally the self switches work exactly the same way as they did before. It's the best way to do it, really: those pieces of data are the minimum you need for a unique identifier of a self switch.
Good to know! Will certainly make the rest of the porting process easier since I don't have to worry about huge differences in functionality. Really do appreciate all the info. 😍
Feel free to hit me up if you have any other queries about the porting process, it's something I'm very good at. 🙂
Will do!

Original thread: https://forums.rpgmakerweb.com/threads/question-on-porting-a-line-of-vxa-ruby-to-rmmv-js.144097/