...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.
Nice to use .slice() with no args for creating a copy! Like it!
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.
...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 useindex & 1
- since index is an int after all.Nice to use
.slice()
with no args for creating a copy! Like it!