********************* 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. fastai 核心部件

    1.ImageDataBunch 对数据封装的很好,包括预处理都在这里面完成了 2.models 现有模型及权重 2-1  create_body 可以用来获取现有模型的主体结构 2-2 create ...

  2. touch cyusbConfig.cmake

    touch cyusbConfig.cmake cmake文件丢失,与其解决问题,不如临时建立一个临时文件

  3. 一、Flux 是什么?

    React 本身只涉及UI层,如果搭建大型应用,必须搭配一个前端框架.也就是说,你至少要学两样东西,才能基本满足需要:React + 前端框架. Facebook官方使用的是 Flux 框架.本文就介 ...

  4. restful api 相关

    404:资源没有找到400:参数错误 200:Get获取成功201:Post创建成功202:Put更新成功 401:未授权403:当前的资源禁止 500:服务器的未知错误 错误码 错误信息 当前url ...

  5. vue2.0 移动端,下拉刷新,上拉加载更多 封装组件

    前言 在做移动端的避免不了 下拉刷新,上拉加载 直接上代码吧,哈哈 组件里: <template lang="html"> <div class="yo ...

  6. PyPy初体验

    PyPy初体验 PyPy安装 1.下载 下载地址:http://pypy.org/download.html(温馨提示:需要梯子) 下载PyPy3.6 64bit Ubuntu版本 解压 下载下来的文 ...

  7. ToolStrip 选中某一项打勾

    (sender as ToolStripMenuItem).Checked = !(sender as ToolStripMenuItem).Checked;

  8. 5.反生成url

    # url(r"^all/(?P<article_type_id>\d+)$", home.index,name="index" ), # 在htm ...

  9. Windows Server 快速生成免费SSL证书 (letsencrypt)

    最近官网需求部署个SSL证书,一番操作后把借鉴的网站与实际过程记录下来 Let's Encrypt,官网是https://letsencrypt.org/,它是一个由各大公司赞助的公益组织: 有趋势有 ...

  10. NOI数论姿势瞎总结(Pi也没有)

    Miller-Rabin素数检测 费马小定理:没人不会吧. 二次探测:如果\(n\)是质数,\(x^2 \equiv 1\ (\mod n)\)的解只有\(x \equiv 1\)或\(x \equi ...