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. there plusplus option allows use of these operators.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -