4 ms·
The ++ thing is due to the fact that JavaScript uses + for concatenation and I've run into real life issues with this, in that if someone writes something like
by jaredmcateer 13y ago
The ++ thing is due to the fact that JavaScript uses + for concatenation and I've run into real life issues with this, in that if someone writes something like
var foo = "The id number is: " + ++this.id + ".";
a Minifier may make that like
var foo="The id number is: "+++this.id+".";
which is a syntax error. Now of course you should be using a minifier that wouldn't be so stupid but it happened in our staging environment because some former employee used a very basic, yet aggressive minifier in the build process from Staging to Live.
JSLint gives you an option to turn it off though, plusplus:false. Same with the variable hoisting warning others have explained.