Namespacing JavaScript

Snook writes about namespacing your JavaScript code and asks what standards we should adopt and the best way of doing it. It is an important topic. Afterall, we namespace our Java, C# etc. code and think it is important there.

Snook namespaces in the following way:
var snook = new Object();
snook.someFunc = function ()
{...}

snook.anotherFunc = function ()
{...}

Do you know of any other ways to namespace your JavaScript?

Viewing 3 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus