Here are the ones that used to keep me up at night, time and time again.
If you fail to use the “var” keyword, your variable will end up in the global scope. I'm not sure I need to tell you why this is bad.
The scope of a variable declared with var is the enclosing function or, for variables declared outside a function, the global scope (which is bound to the global object).
Using var outside a function is optional; assigning a value to an undeclared variable implicitly declares it as a global variable (also a property of the global object). The difference is that a declared variable is a non-configurable property of the global object while an undeclared is configurable.
Consequently, it is recommended to always declare your variables, regardless of being in the global scope or in a function
Put semicolons in, even when it seems optional
Some languages -- Python and Ruby spring to mind -- expect lines to end with line breaks. Each of these has some cleverness to get around issues where a line break may not be the end of a statement, such that it's seldom any problem.
Trailing commas in object declarations break some browsers but not others
In python, the trailing comma is a downright institution; the common use of parentheses for both tuple declaration and statement grouping means that, to declare a tuple with 1 element, the syntax (‘item’,) is a preferred shorthand (with the trailing comma indicating a sequence rather than a group).
”this” doesn’t mean what you probably think it means.
“this” will only ever refer to a function, which means that if you want it to refer to a "class" -- that is, a function enclosing other functions and variables -- you'll need to either enclose your functions in the constructor or use prototype.
If you’ve ever made the mistake of trying to define a "class" using the object notation, or tried to assign a function as a method from outside the constructor, you will have learned this the hard way.
Cross-browser libraries: You probably just thought, “jQuery,” and it is a fine library indeed. However, many utility libraries exist that provide ways of working that avoid some of the problems discussed above. Iterating using functions (as long as you use the var keyword) prevents what should be loop-only variables from escaping. Underscore.js is my favorite utility belt, but choose one you like and leave the browser differences to someone else.