By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

Why this warning?

P: n/a
Like a gazillion others, my js has several:

for (var i=0; i < imax; i++)

When I run the script through JSLint, I get the warning that using the ++
operator is considered harmful. What's that all about?

--
Ed Jay (remove M to respond by email)
Jan 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Ed Jay wrote:
When I run the script through JSLint, I get the warning that using the ++
operator is considered harmful. What's that all about?


If you read the documentation provided on the site
<url:http://www.crockford.com/jslint/lint.html>, then you would've
found this line:

"The ++ (post-increment) and -- (post-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. JSLint does not expect to see them by default.
JSLint currently tolerates the pre-increment and pre-decrement forms."

Jan 18 '06 #2

P: n/a
web.dev wrote:
Ed Jay wrote:
When I run the script through JSLint, I get the warning that using the ++
operator is considered harmful. What's that all about?


If you read the documentation provided on the site
<url:http://www.crockford.com/jslint/lint.html>, then you would've
found this line:


Aptly named - what a crock.

Jan 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.