Javascript Namespace Declaration

Posted by objektivs on Stack Overflow See other posts from Stack Overflow or by objektivs
Published on 2009-05-19T08:11:02Z Indexed on 2010/03/27 6:43 UTC
Read the original article Hit count: 260

Filed under:
|

What neat ways do you use for declaring JavaScript namespaces. I've come across this one:

if (Foo == null || typeof(Foo) != "object") { var Foo = new Object();}

Is there a more elegant or succinct way of doing this?

Just a bit of fun...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about namespace