I saw these 2 basic ways of namespacing in JavaScript.
Using object:
var Namespace = { };
Namespace.Clas
The first one declares a simple object while the second one declares a function. In JavaScript, functions are also objects, so there is almost no difference between the two except that in the second example you can call Namespace() as a function.
Namespace()