...instead of using terniary if-then-else construct and or modulo index % 2 for x/y base or offset access when provided as array [x,y], you can also use index & 1 - since index is an int after all.
index % 2
index & 1
Nice to use .slice() with no args for creating a copy! Like it!
© Espruino, powered by microcosm.
Report a problem