In the example below, when functionA() is invoked, the this keyword refers to the containing object, so I can access its properties (e.g. theValue)
My question: How do I refer to properties of myObj from within the nested functionB()?
var myObj = {
theValue: "The rain in Spain",
functionA: function() {
alert(this.theValue);
},
moreFunctions: {
functionB: function() {
alert(????.theValue);
}
}
}
myObj.functionA();
myObj.moreFunctions.functionB();
Thanks in advance.