Pick a style and stick with it -- that's the rule I use anyway.
- Since JS is case sensitive, I use camel-case for meaningful variable names (ie: thisIsUsingCamelCase)
- I append an underscore to variables if they have local scope to a function (ie: _thisIsMyLocalVariable)
- I put semi-colons at the end of each line (where appropriate).
- I'll use TABs (instead of spaces) for indentation
- I'll try and use long-hand code that is understandable for the next person doing maintenance (rather than condensed/obvuscated code that is less obvious for a non-experienced developer to manage)
These are my own preference... they developed as a result of my experiences within many different organisations... and I consistently use them for all my development. I consider the consistency important... you can adapt to different coding standards (based on your client demands) but you need to be able to adhere to the standard in a consistent manner -- and that, in itself, is a skill you should learn
Thanks for the opportunity to "wake my brain up" this morning!
Jeff