is there a way to set an array of pin modes & watches like how I'm able to read an array of pins with digitalRead?
I'm afraid there isn't anything at the moment, no...
As you had done, COLS.forEach(col => pinMode(col, 'output')); would work pretty well though, or maybe: COLS.forEach(col => col.mode('output'));
COLS.forEach(col => pinMode(col, 'output'));
COLS.forEach(col => col.mode('output'));
@Gordon started
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.
I'm afraid there isn't anything at the moment, no...
As you had done,
COLS.forEach(col => pinMode(col, 'output'));
would work pretty well though, or maybe:COLS.forEach(col => col.mode('output'));