• ECMA-262 Extractions


    For the purpose of this article, ECMA-262 refers to ECMAScript® 2017 Language Specification.

    ECMAScript Data Types & Values

    • Each value has an associated type.
    • Types are subclassified into ECMASCript language types & specification types.
    • An ECMAScript language type (ESLT) corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language.
    • the ESLTs are Undefined, Null, Boolean, String, Symbol, Number, and Object.
    • An ECMAScript language value (ESLV) is a value that is characterized by an ESLT.
    • A type is a set of data values.

    object

    • An object is a member of the type Object.
    • A property is part of an object that associates a key (key, also termed "key value", is either a String value, including the empty string, or a Symbol value) and a value.
    • An object is a collection of properties and has a single "prototype" property.
    • A prototype is an object that provides shared properties for other objects.
    • Each property is either a data property, or an accessor property:
      • A data property associates a key value with an ESLV and a set of Boolean attributes.
      • An accessor property associates a key with one or two accessor functions, and a set of Boolean attributes. The accessor functions are used to store or retrieve an ESLV that is associated with the property.
    • An own property is a property that is directly contained by its object.
    • An inherited property of an object is one that is not an own property but is a property (either own or inherited) of the object's prototype.
    • A function is an object that may be invoked as a subroutine.
    • A method of an object is a function that is the value of a property.
    • An attribute of a property is an internal value that defines characteristic of the property.

    More about objects:

    Even though ECMAScript (ES) include syntax for class definitions, ES objects are not fundamentally class-based such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via literal notation or via constructors which creates objects and then execute code that initializes all or part of them by assigning values to their properties. Each constructor is a function that has a property named "prototype" that is used to implement prototype-based inheritance and shared properties.

    Every object created by a constructor has an implicit reference to the value of its constructor's "prototype" property. Further more, a prototype may have a non-null implicit reference to its prototype. and so on; this is called the prototype chain. When a reference is made to property in an object, that reference is to the property of that name in the first object in the prototype chain that contains a property of that name.

  • 相关阅读:
    Mybatis批量插入,是否能够返回id列表
    SVN和Git代码管理小结
    SVN和Git代码管理小结
    Spring异步执行(@Async)2点注意事项
    Spring异步执行(@Async)2点注意事项
    2015年工作中遇到的问题101-110
    Codeforces 263B. Appleman and Card Game
    Codeforces 263A. Appleman and Easy Task
    HDU 482 String
    字符串hash-BKDRHash
  • 原文地址:https://www.cnblogs.com/Patt/p/7274278.html
Copyright © 2020-2023  润新知