********************* from Professional JavaScript for Web Development

Execution Context And Scope

  The execution context of a variable or function defines what other data it has access to, as well as how it should behave. Each execution context has an associated variable object upon which all of its defined variables and functions exist.

  Each function call has its own execution context. Whenever code execution flows into a function, the function's context is pushed onto a context stack. After the function has finished executing, the stack is poped, returning control to the previously executing context.

  When code is executed in a context, a scope chain of variable objects is created. The purpose of the scope chain is to provide ordered access to all variables and functions that an execute context has access to.

********************* from StackExchange

 Execution context is an object which consists of :

  • variable object, which is activation object is case of functions
  • scope chain, which you can think of as a linked list of outer scopes
  • this value

Variable object is an abstract thing, which can be either one of those :

  • global object (in global context) ;
  • activation object (for functions) ;

Activation object is an object which holds :

  • formal args of the function
  • arguments object for this function.
  • any vars and (named) function inside this functioin

So, activation object is just a special case of variable object;

It is basically a container for all the local stuff you can access by name inside a function, except for this.

What is an Activation object in JavaScript ?的更多相关文章

  1. 向json中添加新的熟悉或对象 Add new attribute (element) to JSON object using JavaScript

    How do I add new attribute (element) to JSON object using JavaScript? JSON stands for JavaScript Obj ...

  2. IOS Object和javaScript相互调用

    在IOS开发中有时会用到Object和javaScript相互调用,详细过程例如以下: 1. Object中运行javascript代码,这个比較简单,苹果提供了非常好的方法 - (NSString ...

  3. What is the most efficient way to deep clone an object in JavaScript?

    What is the most efficient way to deep clone an object in JavaScript? Reliable cloning using a libra ...

  4. How to access the properties of an object in Javascript

    Javascript has three different kinds of properties: named data property, named accessor property and ...

  5. object in javascript

    枚举对象属性 for....in 列举obj的可枚举属性,包括自身和原型链上的 object.keys() 只列举对象本身的可枚举属性 创建对象的几种方式 对象字面量 const pre='test' ...

  6. Iterable object of JavaScript

    数组是可迭代的,所以数组可以用于for of,字符串也是可迭代的,所以字符串也可以用作for of,那么,对象呢? 试一试: var somebody = { start:0, end:100 } f ...

  7. JavaScript:变量对象(Variable Object)

    引言:在使用JavaScript编程的时候,避免不了声明函数和变量,但是我们很少知道解释器是如何并且在什么地方找到这些函数和变量的,我们在引用这些对象的时候究竟发生了什么? 对ECMAScript程序 ...

  8. JavaScript内部原理系列-变量对象(Variable object)

    概要 我们总是会在程序中定义一些函数和变量,之后会使用这些函数和变量来构建我们的系统.然而,对于解释器来说,它又是如何以及从哪里找到这些数据的(函数,变量)?当引用一个对象的时候,在解释器内部又发生了 ...

  9. 深入理解JavaScript系列(12):变量对象(Variable Object)

    介绍 JavaScript编程的时候总避免不了声明函数和变量,以成功构建我们的系统,但是解释器是如何并且在什么地方去查找这些函数和变量呢?我们引用这些对象的时候究竟发生了什么? 原始发布:Dmitry ...

随机推荐

  1. 关于join

  2. [易学易懂系列|rustlang语言|零基础|快速入门|(15)|Unit Testing单元测试]

    [易学易懂系列|rustlang语言|零基础|快速入门|(15)] 实用知识 Unit Testing单元测试 我们知道,在现代软件开发的过程中,单元测试对软件的质量极及重要. 今天我们来看看Rust ...

  3. Tableau Sheet中的操作

    如果想要给数据排名,例如给饼图中的数据排名 1 创建一个Rank 描述为INDEX()的测度 2.将RANK用Label形式显示并且编辑计算方法选择特定的属性. 属性本身也有可以快速计算的一些方式. ...

  4. SELinux 对nginx访问目录的影响

    centos新装的系统,用yum 安装的nginx . 因用yum 安装的nginx 默认目录在/usr下面. 当SELinux开启时,将会禁止访问设置在其他路径下的地址.比如我设置server 中 ...

  5. 【LuoguP5328】[ZJOI2019]浙江省选

    题目链接 题意 给你一堆斜率和纵截距都为正的直线 ,求对于一个条直线是否存在一个 x 使得在这条直线在 x 处能是前 m 大,输出最高能够达到的排名(排名定义为在 x 处严格大于自己的直线条数+1) ...

  6. TTTTTTTTTTTTTT CF 645D 点的优先级

    题意:给你n个节点,m对优先级关系,a[i] b[i]代表a[i]的优先级比b[i]高,现在问你至少需要前多少对关系就能确定所有节点的优先级: #include <iostream> #i ...

  7. 【BZOJ3545&BZOJ3551】Peaks(kruskal重构树,主席树,dfs序)

    题意:在Bytemountains有N座山峰,每座山峰有他的高度h_i. 有些山峰之间有双向道路相连,共M条路径,每条路径有一个困难值,这个值越大表示越难走, 现在有Q组询问,每组询问询问从点v开始只 ...

  8. Hexo + github pages + 阿里云绑定域名搭建个人博客

    申请域名 万网购买的域名,地址:https://wanwang.aliyun.com/domain/com?spm=5176.8142029.388261.137.LoKzy7 控制台进行解析 控制台 ...

  9. Spark译文(三)

    Structured Streaming Programming Guide(结构化流编程指南) Overview(概貌) ·Structured Streaming是一种基于Spark SQL引擎的 ...

  10. JavaWeb_Get和Post方法传输数据区别

    Get方法和Post方法传输数据区别: 传送门 GET在浏览器回退时是无害的,而POST会再次提交请求 GET产生的URL地址可以被Bookmark,而POST不可以 GET请求会被浏览器主动cach ...