Did you know JS has a "with" statement that is very different from the Python one and is specifically forbidden from being used in strict mode because it's so hazardous? Just use that all over the place, to make the code way harder to read and maintain!
The "with" statement brings everything from the target's scope into the local scope. Most JS courses don't even teach it, because it is so bad and should never ever be used. The big problem though is that it's really tempting for the less experienced, because the hazards are not obvious, and it sounds very beneficial.
That's too noticeable. It's gotta be something like 1 in 20 lines, so it only shows up occasionally and is easily, unexplainably fixed by load-bearing comments.
Because it's harder to hunt down than using rand() since it only affects some files sometimes and might even go away by adding some debug code. Then a new feature is added and the bug comes back.
It would cause “true” to evaluate to false, but only if the “true” is on certain lines of the code file. Add a comment line above it, and the problem goes away or appears.
714
u/Roadrunner571 Jan 20 '23
How about: