For class1, because you cannot create an object of type object1.
However, if the code looks like this:
function object1() {
this.class1 = function() {
this.property1 = null;
this.property2 = 'ab';
}
}
You may have:
var obj = new object1();
obj.class1();
obj.property2;
var cls = new obj.class1();
cls.property2;
So this may be context specific.
source
share