2 ms·
Another disadvantage of reusing the same variable name is the order of the statements is usually important and it isn't always obvious how, especially when you
by seanwilson 7y ago
Another disadvantage of reusing the same variable name is the order of the statements is usually important and it isn't always obvious how, especially when you do this in longer functions.
When you're refactoring, you then have to be much more careful when moving lines of code of code around. With unique names, you get more of a safety net (including compile time errors if you're using something like TypeScript).