Namespace Declaration


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var yourNamespace = {
  2.  
  3. foo: function() {
  4. },
  5.  
  6. bar: function() {
  7. }
  8. }
  9.  
  10. ...
  11.  
  12. yourNamespace.foo();

URL: http://stackoverflow.com/questions/881515/javascript-namespace-declaration

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.