Over a million developers have joined DZone.

Create A JavaScript Object The JSAN Way

·
if (!this.AA) AA = {};

AA = function()
{
}

AA.prototype =
{
       test: function()
       {
               document.writeln("test");
       }
}

blah = new AA();

blah.test();
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}