Just gas.get() should print out the result on the console.
@Gordon just checked, gas.get(print) does work. But (was puzzled about the "why does it work at all?") that snippet is "wrong". It's working as intended, but the print is not needed / used by the code. The REPL just prints out the result. Or is there some magic in the background?
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.
Just
gas.get()
should print out the result on the console.@Gordon just checked,
gas.get(print)
does work. But (was puzzled about the "why does it work at all?") that snippet is "wrong". It's working as intended, but theprint
is not needed / used by the code. The REPL just prints out the result. Or is there some magic in the background?