前端学习笔记202310学习笔记第一百壹拾一天-作用域&作用域链&预编译&闭包基础5

function a(){
    function b(){
        function c(){

        }
        c()
    }
    b()
}
a()

//a定义:a.[[scope]]->0:GO
//a执行:a.[[scope]]->0:a->AO
//                   1:-GO
//b定义:b.[[scope]]->0:a->AO
//                   1:GO
//b执行:b.[[scope]]->0:b->AO
//                   1:a->AO
//                   2:GO
//c定义:c.[[scope]]->0:b->AO
//                   1:a->AO
//                   2:GO
//c执行:c.[[scope]]->0:c->AO
//                   1:b->AO
//                   2:a->AO
//c结束:c.[[scope]]->0:b->AO
//                   1:a->AO
//                   2:GO
//b结束:b.[[scope]]->0:a->AO
//                   1:GO
//      c.[[scope]] X
//a结束:a.[[scope]]->0:GO
//        b.[[scope]] X           
    
posted @ 2023-11-07 09:13  前端导师歌谣  阅读(3)  评论(0编辑  收藏  举报  来源