After reading Douglas Crockford’s “JavaScript: The Good Parts” and Stoyan Stevanov’s “JavaScript Patterns,” I’m trying to determine exactly what ‘excessive trickiness’ means. They both say that this occours when using either ++ or -- in your code, but can’t find a firm definition for this term, either within SO or via a Google search. Any ideas?
After reading Douglas Crockford’s JavaScript: The Good Parts and Stoyan Stevanov’s JavaScript Patterns, I’m
Share
You can hear it from Crockford himself here: http://www.youtube.com/watch?feature=player_detailpage&v=47Ceot8yqeI#t=4140s
The simple answer is that
++and--act on a variable, and usually do it at the same time as you’re doing something else to that variable. For example, can you quickly decide what this does?More StackOverflow discussion: Why avoid increment ("++") and decrement ("–") operators in JavaScript?