It is interesting that this question spawned such criticism/discussion as to whether it should be done in Javascript or not, but not as to why the OP did not know such basic language operators in the first place.
Alright, he did not know them and hence asked (thats after all what a forum is there for) but then simply explain it and carry on. Discussing the "evilness" of basic negation and decrement operators is useless and counter-productive.
Alright, he did not know them and hence asked (thats after all what a forum is there for) but then simply explain it and carry on. Discussing the "evilness" of basic negation and decrement operators is useless and counter-productive.