As you may wander if there is a code convetion for JavaScript, well there are a lot of articles outside in the web. I recommend a Douglas Crockford’s page http://javascript.crockford.com/code.html

Related posts:

  1. Should I do Something Only Because Crockford Says So?
  2. Zend Framework: Inject JavaScript Code in a Action/View
  3. Joomla! – Old Code or Bad Code?