@Gordon, thanks for pointing it out. It can really be tricky with minification. It was fun to think thru this small piece of code...
Btw, these two lines
options.selected = (dir+options.selected)%menuItems.length; if (options.selected<0) options.selected += menuItems.length;
can be put into one, since % takes care of the business:
options.selected = (dir+options.selected+menuItems.length)%menuItems.length;
@allObjects 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.
@Gordon, thanks for pointing it out. It can really be tricky with minification. It was fun to think thru this small piece of code...
Btw, these two lines
can be put into one, since % takes care of the business: