0
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.
                }
            }
        }
    }
};

我找到了这个答案,它说它在 JS 中不受本机支持。有什么方法可以从内部对象访问外部对象属性?

4

0 回答 0