javascript - JSLint complains over math operator "++" syntax -
why jslint complainig syntax:
var myint; myint = 0; myint++; www.jslint.com response:
unexpected '++'. myint++;
jslint doesn't ++, wants use myint += 1. highly debatable, see why avoid increment ("++") , decrement ("--") operators in javascript?
there option let pass, though (on web interface, it's under "tolerate...").
from jslint help:
the
++(increment) ,--(decrement) operators have been known contribute bad code encouraging excessive trickiness. second faulty architecture in enabling viruses , other security menaces. also, preincrement/postincrement confusion can produce off-by-one errors extremely difficult diagnose. thereplusplusoption allows use of these operators.
Comments
Post a Comment