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  

         




  • 相关阅读:
    .Net常见笔试题
    冒泡排序算法 C#版
    Bundle捆绑压缩技术
    异步Ajax
    HtmlHelper总结
    HtmlHelper的扩展分页方法
    WCF
    程序猿值得看的几个技术网站(记录)
    Struts2和SpringMVC的区别
    nginx配置文件作用介绍
  • 原文地址:https://www.cnblogs.com/jokes/p/9197997.html
Copyright © 2011-2022 走看看