Function to define a namespace in JavaScript (namespace.js)
Sample Code:
// Define a namespace 'aaa.bbb.ccc' and add a function 'hello'
// under the namespace which prints 'Hello, world.'.
namespace('aaa.bbb.ccc').hello = function() {
print('Hello, world.');
};
// Execute the function.
aaa.bbb.ccc.hello();