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:
Javascript is prototype based, it is not a regular OOP language like PHP or Java.
Take a look to Inheritance and the prototype chain and implement something like Simple Javascript inheritance.
You could probably access to parent through window.parent if it is in the global scope, but your example will not work in every case.