jshPinGetState does a lot more than just return whether the pin is on or off, it does 'pullup'/'input'/'output'/etc - it's what is used for getPinMode - so you do need the array.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
edit: didn't see the previous posts.
jshPinGetState does a lot more than just return whether the pin is on or off, it does 'pullup'/'input'/'output'/etc - it's what is used for
getPinMode
- so you do need the array.