How would I do the following:
var Parent = function() {
this.Child = {
childFunction: function() {
this.parentFunction();
}
};
this.parentFunction = function() {
}
};
var parentObj = new Parent();
parentObj.Child.childFunction();
At the moment I'm getting "undefined is not a function" because obviously parentFunction() isn't in scope, but I'm not sure what the best way to make it accessible is?