JSLint doesn't like ++
, it wants you to use myint += 1
. This is highly debatable, see Why avoid increment ("++") and decrement ("--") operators in JavaScript?
There is an option to let it pass, though (on the web interface, it's under "tolerate...").
From JSLint help:
The
++
(increment) and--
(decrement) operators have been known to contribute to bad code by encouraging excessive trickiness. They are second only to faulty architecture in enabling to viruses and other security menaces. Also, preincrement/postincrement confusion can produce off-by-one errors that are extremely difficult to diagnose. There is aplusplus
option that allows the use of these operators.