How do I access external variables in a closure?

:[
            {"id":28,"text":"",    
                "children":[
                    {"id":1,"text":""},{"id":2,"text":""},
                    {"id":6,"text":"","children":[{"id":47,"text":""}]},
                    {"id":11,"text":"","children":[{"id":24,"text":""},{"id":27,"text":""}]},
                    {"id":22,"text":""},
                    {"id":26,"text":"","children":[{"id":32,"text":""},{"id":33,"text":"","children":[{"id":55,"text":""}]}
                    ]}
                ]
             }
         ] 
         


 for (let i=0,len=data.length;i<len;iPP) {
    if (this.organformId === data[i].organguid) {
        data[i].organname = datas[0].organName
    } 
    else {
        if (data[i].children != null && data[i].children.length>0) {
            console.log(this.organformId) //
            (function () {
                var _obj = arguments[0];
                console.log(this.organformId)//
                for (let j=0, _len=_obj.length;j<_len;jPP) {
                    if (this.organformId === _obj[j].organguid) {
                         console.log(this.organformId)
                        _obj[j].organname = datas[0].organName
                        _obj[j].organtype = datas[0].organType
                        _obj[j].organDesc = datas[0].organDesc
                    } else {
                        if  (_obj[j].children!=null&&_obj[j].children.length>0) {
                             arguments.callee(_obj[j].children);
                        }
                    }
                }
            })(data[i].children)
        }
    }
Sep.11,2021

the simplest thing is to store a variable
var _ this = this

externally.
(function () {
    console.log(_this.organformId)
    ....
})(data[i].children)

var b = {};
b.name = 'zhang';
b.age = '18';
b.method = function(){
    console.log(this.name); //zhang
    let self =this;
    (function(self){
        console.log(self.name);//zhang
        console.log(self.age);//18
        console.log(this.name);//undefined
        console.log(this.age);//undefined
    })(self);
}
b.method();

I hope to understand it and adopt it!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3dd64-597b6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3dd64-597b6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?