let x = {
name:"vin1",
oi:this,
ob:{
name:"vin2",
ob1:{
name:'vin3',
ob2:{
name:"vin4",
func:function(){
console.log(name); // I want to access the name "vin1" here.
}
}
}
}
};
I found this answer which says it's not natively supported in JS. Any way to access the outer object property from the inner object?