ES5 Study

Keywords

 

break

 

do

 

instanceof

 

typeof

 

case

 

else

 

new

 

var

 

catch

 

finally

 

return

 

void

 

continue

 

for

 

switch

 

while

 

debugger

 

function

 

this

 

with

 

default

 

if

 

throw

 

delete

 

in

 

try

 

 

Future Reserved words

class

 

enum

 

extends

 

super

 

const

 

export

 

import

 

implements

 

let

 

private

 

public

 

yield

 

interface

 

package

 

protected

 

static

 

 

ECMAScript language types: Undefined, Null, Boolean, String, Number and Object.

 

A specification type corresponds to meta-values that are used within algorithms to describe the semantics of ECMAScript language constructs and ECMAScript language types. The specification types are Reference, List, Completion, Property Descriptor, Property Identifier, Lexical Environment, and Environment Record. Specification type used to describe intermediate results of EScript expression evaluation, but cannot be stored as properties of objects or values of EScript language variables.

 

Undefined Type-undefined,

Null Type - null,

Boolean Type - true or false,

String Type - set of all finite ordered sequences of zero or more 16-bit unsigned integer values("elements").

Number Type - NaN, +Infinity(Infinity), -Infinity, +0(0), -0,

Object Type - a collection of properties. Each property is either a named data property, a named accessor property, or an internal property.

    data property: associates a name with an ECMAScript language value and a set of Boolean attributes

    accessor property: associates a name with one or two accessor functions, and a set of Boolean attributes. It used to store or retrieve an ECMAScript language value that is associated with the property.

    internal property: has no name and is not directly accessible via EScript language operators. It exist purely for specification purposes.

 

Two kinds of access for named(non-internal) properties: get and put, corresponding to retrieval and assignment, respectively.

 

Attributes of a Named Data Property:

[[Value]], [[Writable]], [Enumerable]], [[Configurable]]

Attributes of a Named Accessor Property:

[[Get]], [[Set]], [[Enumerable]], [[Configurable]]

 

Default Attribute Values:

Attribute Name

 

Default Value

 

[[Value]]

 

 

undefined

 

[[Get]]

 

 

undefined

 

[[Set]]

 

 

undefined

 

[[Writable]]

 

 

false

 

[[Enumerable]]

 

 

false

 

[[Configurable]]

 

 

false

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章