I have been using namespaces to package my JavaScript code. In some of the examples that I have read, all caps have been used for the global name. For example: MYAPPLICATIONNAME.module.function
Is using all capitals the best practice since it seperates the vars in the global namespace, or is it just more confusing?
I think it is a good practice to use all caps to represent global variables, see: http://javascript.crockford.com/code.html
YUI is one of the example, e.g. YAHOO or YUI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With