Other ways to increment a variable in JavaScript
<p>I'm a big fan of Douglas Crockford and his excellent book, <a href="http://rads.stackoverflow.com/amzn/click/0596517742" rel="nofollow">JavaScript: The Good Parts</a>. I also use his <a href="http://www.jslint.com" rel="nofollow">JSLint</a> tool on an hourly basis before checking in any code to our repository, as is good sense.</p>

<p>One thing I've noticed when running code through JSLint is its insistence that the ++ increment operator is somehow evil. I know I can turn certain rules off, but that's cheating ;). Crockford mentions his dislike on page 112 of JS: TGP...</p>

<blockquote>
  <p>In my own practice, I observed that when I used ++ and --, my code tended to be too tight, too tricky, too cryptic. So, as a matter of discipline, I don't use them any more. I think that as a result, my coding style has become cleaner.</p>
</blockquote>

<p>That's all very lovely, but he doesn't give any examples of the way he codes them now. I assume he's doing something like...</p>

<pre><code>var i;
i = 0;
i = i + 1;
</code></pre>

<p>Again, great, but I've got a few basic 'for loops' in my JS code, as I imagine many people have, and I've always used the standard syntax...</p>

<pre><code>for (i = 0; i &lt; myArray.length; i++) { 
    // Loop Stuff 
}
</code></pre>

<p>Am I missing something? What's the cleanest and/or best way to increment/decrement?</p>
