Why avoid increment ("++") and decrement ("--") operators in JavaScript?
- by artlung
I'm a big fan of Douglas Crockford's writing on JavaScript, particularly his book JavaScript: The Good Parts. It's made me a better JavaScript programmer and a better programmer in general. One of his tips for his jslint tool is this :
++ and --
The ++ (increment) and -- (decrement)
operators have been known to contribute to bad code by
…