How do I define nested class in Java Script.
Here is the code snippet I have:
objA = new TestA();
function TestB ()
{
this.testPrint = function ()
{
print ( " Inside testPrint " );
}
}
function TestA ()
{
var myObjB = new TestB();
}
Now I am trying to access testPrint using objA
objA.myObjB.testPrint();
But its giving error "objA has no properties"
How can I access testB method using objA handler?