• Sat 2021.05.29

    Although this might be more of a user/author preference, I was taught one path for data in, one path for data out, otherwise there will come the day the trap will spring. Under some circumstances, it may be prudent to have more than one return statment within a function, such as trying a quick hack to test some other code block, but I think you will find that, that technique will lead to more errors and headaches over time.

    ref: L25 L37 L43 return

    Another useful tool using the WebIDE should than not be discovered yet. As simple as adding the line 'debugger;' as the breakpoint, then single step through or roll-over each variable to reveal it's value.

    http://www.espruino.com/Debugger

About

Avatar for Robin @Robin started