发布日期:2015-12-04 15:33:16

在学习Javascript的prototype与__proto__区别时,发现了这样一篇介绍javascript核心的好文章。原文:javascript the core. 本想阅读后好好整理翻译下,不过网上已经有很好的翻译文章,就此省略,链接在此。这里只作简单摘要:

javascript核心概念:

  1. An Object 对象
    An object is a collection of properties and has a single prototype object. The prototype may be either an object or the null value.
  2. A prototype chain 原型链
    A prototype chain is a finite chain of objects which is used to implement inheritance and shared properties.
  3. Constructor 构造函数
  4. Exceution context stack 执行上下文栈
  5. Exceution content 执行上下文
  6. Variable object 变量对象
    A variable object is a container of data associated with the execution context. It’s a special object that stores variables and function declarations defined in the context.
  7. Activation Object 活动对象
  8. Scope chain 作用域链
    A scope chain is a list of objects that are searched for identifiers appear in the code of the context.
  9. Closures 闭包
    A closure is a combination of a code block (in ECMAScript this is a function) and statically/lexically saved all parent scopes. Thus, via these saved scopes a function may easily refer free variables.
  10. this 
    A this value is a special object which is related with the execution context. Therefore, it may be named as a context object (i.e. an object in which context the execution context is activated).
    
    a this value is a property of the execution context, but not a property of the variable object.

     

发表评论