DEV Community

Discussion on: JavaScript — Back to Basics: Prefix vs. Postfix

Collapse
 
nestedsoftware profile image
Nested Software • Edited

As @AndrewBuntine said, this operator seems to originate from the world of C, or maybe even assembly language before that. I am not a big fan of it for general-purpose programming, and probably I would be inclined to suggest counter += 1 as a better idiom than counter++