Exploring the world of object-oriented programming in JavaScript for the first time. It may sound like a simple question, but I really want to grasp this concept fully.
var objA = {
a : 10,
b : 20,
newobjB : {
c : 100,
funOfObjB: function(){
console.log(this.a)
}
}
}
I'm looking to access the value of a parent object variable using this particular concept. I've attempted using the bind() method, but it seems to be returning unexpected data in the (this) variable.
Appreciate any assistance on this matter.