Hi
I’m slowly progressing in programming as an old man, I realize that I often have variables lying around so I’ll try to make it a habit to delete them after use,
what do you advise me to use, is it better to set it to 0 or undefined (because 0 is still defined)
or maybe some links to help me avoid programming traps
tks in advance for all you light 🙂
variables lying around
In your code?
If yes, then easisest is to rem / comment them out using // at the begining of the Line on which the variable is located.
Somehow I think you mean different than I am thinking?? 🙂
I usually Rem redundant code. If I feel in a ‘tidying up / squeaky clean mood’ I delete.
However, it can be useful to leave redundant code rem’d out as a reminder of what you tried … else you may waste your tme trying it again in the future??
For reference, variables cannot be undefined if they had a value once.