there is no return value from peekVal(), return value from method passed to setTimeout is something completely unrelated
https://stackoverflow.com/questions/24928846/get-return-value-from-settimeout
and BTW, I wouldn't consider that as 'simple piece of code', looks more like opposite of that :-)
@fanoush 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.
there is no return value from peekVal(), return value from method passed to setTimeout is something completely unrelated
https://stackoverflow.com/questions/24928846/get-return-value-from-settimeout
and BTW, I wouldn't consider that as 'simple piece of code', looks more like opposite of that :-)