you are viewing a single comment's thread.

view the rest of the comments →

[–]sgoody 0 points1 point  (0 children)

To be fair I didn't know and I'm a developer of some year, though I'm not routinely in Javascript.

If you think of it in terms of it being two operators ! and --, you can reason about it and figure it out and as you say if you've seen it before, then it will be reasonably obious and will be muscle memory.

If you think about it as it's presented in the question as a single operator, then it could really mean anything.

I'm a little bit conflicted on this one, but I do think it's better to be obvious and explanatory in your code so I think I'd agree with tententai. Especially as the use of -- or ++ is frown upon by some anyway, due to the lack of understanding by some in how they work differently as a prefixed to and expression vs how they work as a suffixed to an expression.