It is interesting that this question spawned such criticism&#x2F;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.<p>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 &quot;evilness&quot; of basic negation and decrement operators is useless and counter-productive.