zoukankan      html  css  js  c++  java
  • 作用域链、函数执行上下文、全局执行上下文

    function a(){
        function b(){
        function c(){}
        c();
        };
        b();           
    }
    a();

    a defined -->a[[scope]]-->[0]:GO

    a doing    -->a[[scope]]-->[0]:aAO

                 [1]:GO

    b defined -->b[[scope]]-->[0]:aAO

                   [1]:GO

    b doing   -->d[[scope]]-->[0]: bAO

                  [1]:aAO

                  [2]:GO

    c defined -->c[[scope]]-->[0]:bAO

                   [1]:aAO

                [2]:GO

    c doing -->c[[scope]]  -->[0]:cAO

               [1]:bAO

               [2]:aAO

               [3]:GO

    c over  -->b[[scope]]  -->[0]:bAO

               [1]:aAO

               [2]:GO

    b over  -->a[[scope]]  -->[0]:aAO

               [1]:GO

    a over  

         




  • 相关阅读:
    decltype类型指示符
    vector的使用
    参数使用
    CSPS模拟 43
    CSPS模拟 41
    CSPS模拟 42
    NOIP模拟 40
    NOIP模拟 39
    NOIP模拟 38
    NOIP模拟 37
  • 原文地址:https://www.cnblogs.com/jokes/p/9197997.html
Copyright © 2011-2022 走看看