

“Must Follow” JavaScript Best Practices - cwan
http://www.developerdrive.com/2011/08/top-10-must-follow-javascript-best-practices-2/

======
taitems
This is quite the eclectic mix. There are suggestions here that are great for
beginners (learning JavaScript before learning jQuery, to gain a better
understanding of the fundamentals) and yet there are some excessively fine-
grained suggestions that don't really mean anything to the modern JavaScript
developer.

The section on "Debug JavaScript Code" is vague and ambiguous, and the
problems with extending the prototype are just wtf-inducing. Can't say I've
ever run across that problem in my years of JavaScript development, nor have I
heard of anyone else having problems.

Things like using one "var" declaration and comma separating values are great
in theory, but are just going to lead to global leakage for the average Joe.

Be careful of premature optimisation.

