One way to tidy up uplcd and onKey might be to have a separate function for each menustate? You could either then keep the 'if' statements, or could probably even look the functions up in an array...
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.
One way to tidy up
uplcd
andonKey
might be to have a separate function for eachmenustate
? You could either then keep the 'if' statements, or could probably even look the functions up in an array...