• ...opening curly brace - in line 12 - fell victim to the experience that allows writing code top of your head without testing... (EDIT: obviously fixed now). I like this variable option. Put it as a single line with (could not let go my 'Schnapszahl'):


    I use a similar approach for my debugging, logging:

    • have a variable each for enabling / disabling it, for example lon for log is on
    • a log() that invokes console.log(arguments); to save space
    • invoking on one line `if (lon) log(...); to filter for final load

    In (my) emulation I have an overwrite that logs way much more...

    It is always a good approach to keep code changes the smallest between dev and release... last but not least also to be able to fall back in case debug is needed without having to change code but just the value of a variable.


Avatar for allObjects @allObjects started