I have a small issue in JS, I have two nested objects, and I would like to access a variable from the parent, like so:
var parent = { a : 5, child:
In your example you haven't inheritance. You may do this
... displayA : function(){ console.log(parent.a); // 5 }, ... parent.child.parent = parent; parent.child.displayA();