Hy there, Thank you such a wonderful handson Tutorials, I am in Love with RITHM School Tutorials now.
I was stuck in a exercise though, the snipet for the tutorials on keyowrd 'this', which is given, as below:
var instructor = {
firstName: 'Tim',
info: {
catOwner: true,
boatOwner: true,
displayLocation: function(){
return this.location;
},
data: {
location: "Oakland",
logLocation: this.displayLocation
}
},
}
instructor.info.data.logLocation() // Why might we be getting an error here?
can anyone explain me this, and also the solution for the same. ?
Regards,
Ajay. R