Annotated ECMAScript 5.1

‟Ex igne vita”

toc · single-page version · key · source

This is not the normative ECMAScript Language specification. The normative spec (ECMA 262) is a PDF file maintained by ECMA TC39 and is available from http://www.ecmascript.org/. An auto-generated HTML version is available, too: http://ecma-international.org/ecma-262/5.1/

This is an annotated, hyperlinked, HTML version of Edition 5.1 of the ECMAScript Specification, the source for which is maintained at https://github.com/es5/es5.github.io. No copyright is asserted on its front matter (everything up through the Table of Contents), but any reuse of its body text (everything following the Table of Contents) must include the normative spec’s copyright notice and license statement.

To view annotations, follow the , , , , , , and hyperlinks in the headings. A key to the markers explains the different types of annotations. Also included are a variety of hyperlinked cross-references, following the example of Jason Orendorff’s version at http://people.mozilla.org/~jorendorff/es5.html

Table of Contents

  1. Introduction
  2. 1 Scope
  3. 2 Conformance
  4. 3 Normative references
  5. 4 Overview
  6. 5 Notational Conventions
  7. 6 Source Text
  8. 7 Lexical Conventions
  9. 8 Types
  10. 9 Type Conversion and Testing
  11. 10 Executable Code and Execution Contexts
  12. 11 Expressions
  13. 12 Statements
  14. 13 Function Definition
  15. 14 Program
  16. 15 Standard Built-in ECMAScript Objects
  17. 16 Errors
  18. Annex A (informative) Grammar Summary
  19. Annex B (informative) Compatibility
  20. Annex C (informative) The Strict Mode of ECMAScript
  21. Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact
  22. Annex E (informative) Additions and Changes in the 5th Edition that Introduce Incompatibilities with the 3rd Edition
  23. Annex G (informative) Visual representation of part of ES specs internal behavior
  24. Bibliography

Full Table of Contents

  1. Introduction
  2. 1 Scope
  3. 2 Conformance
  4. 3 Normative references
  5. 4 Overview
    1. 4.1 Web Scripting
    2. 4.2 Language Overview
      1. 4.2.1 Objects
      2. 4.2.2 The Strict Variant of ECMAScript
    3. 4.3 Definitions
      1. 4.3.1 type
      2. 4.3.2 primitive value
      3. 4.3.3 object
      4. 4.3.4 constructor
      5. 4.3.5 prototype
      6. 4.3.6 native object
      7. 4.3.7 built-in object
      8. 4.3.8 host object
      9. 4.3.9 undefined value
      10. 4.3.10 Undefined type
      11. 4.3.11 null value
      12. 4.3.12 Null type
      13. 4.3.13 Boolean value
      14. 4.3.14 Boolean type
      15. 4.3.15 Boolean object
      16. 4.3.16 String value
      17. 4.3.17 String type
      18. 4.3.18 String object
      19. 4.3.19 Number value
      20. 4.3.20 Number type
      21. 4.3.21 Number object
      22. 4.3.22 Infinity
      23. 4.3.23 NaN
      24. 4.3.24 function
      25. 4.3.25 built-in function
      26. 4.3.26 property
      27. 4.3.27 method
      28. 4.3.28 built-in method
      29. 4.3.29 attribute
      30. 4.3.30 own property
      31. 4.3.31 inherited property
  6. 5 Notational Conventions
    1. 5.1 Syntactic and Lexical Grammars
      1. 5.1.1 Context-Free Grammars
      2. 5.1.2 The Lexical and RegExp Grammars
      3. 5.1.3 The Numeric String Grammar
      4. 5.1.4 The Syntactic Grammar
      5. 5.1.5 The JSON Grammar
      6. 5.1.6 Grammar Notation
    2. 5.2 Algorithm Conventions
  7. 6 Source Text
  8. 7 Lexical Conventions
    1. 7.1 Unicode Format-Control Characters
    2. 7.2 White Space
    3. 7.3 Line Terminators
    4. 7.4 Comments
    5. 7.5 Tokens
    6. 7.6 Identifier Names and Identifiers
      1. 7.6.1 Reserved Words
        1. 7.6.1.1 Keywords
        2. 7.6.1.2 Future Reserved Words
    7. 7.7 Punctuators
    8. 7.8 Literals
      1. 7.8.1 Null Literals
      2. 7.8.2 Boolean Literals
      3. 7.8.3 Numeric Literals
      4. 7.8.4 String Literals
      5. 7.8.5 Regular Expression Literals
    9. 7.9 Automatic Semicolon Insertion
      1. 7.9.1 Rules of Automatic Semicolon Insertion
      2. 7.9.2 Examples of Automatic Semicolon Insertion
  9. 8 Types
    1. 8.1 The Undefined Type
    2. 8.2 The Null Type
    3. 8.3 The Boolean Type
    4. 8.4 The String Type
    5. 8.5 The Number Type
    6. 8.6 The Object Type
      1. 8.6.1 Property Attributes
      2. 8.6.2 Object Internal Properties and Methods
    7. 8.7 The Reference Specification Type
      1. 8.7.1 GetValue (V)
      2. 8.7.2 PutValue (V, W)
    8. 8.8 The List Specification Type
    9. 8.9 The Completion Specification Type
    10. 8.10 The Property Descriptor and Property Identifier Specification Types
      1. 8.10.1 IsAccessorDescriptor ( Desc )
      2. 8.10.2 IsDataDescriptor ( Desc )
      3. 8.10.3 IsGenericDescriptor ( Desc )
      4. 8.10.4 FromPropertyDescriptor ( Desc )
      5. 8.10.5 ToPropertyDescriptor ( Obj )
    11. 8.11 The Lexical Environment and Environment Record Specification Types
    12. 8.12 Algorithms for Object Internal Methods
      1. 8.12.1 [[GetOwnProperty]] (P)
      2. 8.12.2 [[GetProperty]] (P)
      3. 8.12.3 [[Get]] (P)
      4. 8.12.4 [[CanPut]] (P)
      5. 8.12.5 [[Put]] ( P, V, Throw )
      6. 8.12.6 [[HasProperty]] (P)
      7. 8.12.7 [[Delete]] (P, Throw)
      8. 8.12.8 [[DefaultValue]] (hint)
      9. 8.12.9 [[DefineOwnProperty]] (P, Desc, Throw)
  10. 9 Type Conversion and Testing
    1. 9.1 ToPrimitive
    2. 9.2 ToBoolean
    3. 9.3 ToNumber
      1. 9.3.1 ToNumber Applied to the String Type
    4. 9.4 ToInteger
    5. 9.5 ToInt32: (Signed 32 Bit Integer)
    6. 9.6 ToUint32: (Unsigned 32 Bit Integer)
    7. 9.7 ToUint16: (Unsigned 16 Bit Integer)
    8. 9.8 ToString
      1. 9.8.1 ToString Applied to the Number Type
    9. 9.9 ToObject
    10. 9.10 CheckObjectCoercible
    11. 9.11 IsCallable
    12. 9.12 The SameValue Algorithm
  11. 10 Executable Code and Execution Contexts
    1. 10.1 Types of Executable Code
      1. 10.1.1 Strict Mode Code
    2. 10.2 Lexical Environments
      1. 10.2.1 Environment Records
        1. 10.2.1.1 Declarative Environment Records
          1. 10.2.1.1.1 HasBinding(N)
          2. 10.2.1.1.2 CreateMutableBinding (N, D)
          3. 10.2.1.1.3 SetMutableBinding (N,V,S)
          4. 10.2.1.1.4 GetBindingValue(N,S)
          5. 10.2.1.1.5 DeleteBinding (N)
          6. 10.2.1.1.6 ImplicitThisValue()
          7. 10.2.1.1.7 CreateImmutableBinding (N)
          8. 10.2.1.1.8 InitializeImmutableBinding (N,V)
        2. 10.2.1.2 Object Environment Records
          1. 10.2.1.2.1 HasBinding(N)
          2. 10.2.1.2.2 CreateMutableBinding (N, D)
          3. 10.2.1.2.3 SetMutableBinding (N,V,S)
          4. 10.2.1.2.4 GetBindingValue(N,S)
          5. 10.2.1.2.5 DeleteBinding (N)
          6. 10.2.1.2.6 ImplicitThisValue()
      2. 10.2.2 Lexical Environment Operations
        1. 10.2.2.1 GetIdentifierReference (lex, name, strict)
        2. 10.2.2.2 NewDeclarativeEnvironment (E)
        3. 10.2.2.3 NewObjectEnvironment (O, E)
      3. 10.2.3 The Global Environment
    3. 10.3 Execution Contexts
      1. 10.3.1 Identifier Resolution
    4. 10.4 Establishing an Execution Context
      1. 10.4.1 Entering Global Code
        1. 10.4.1.1 Initial Global Execution Context
      2. 10.4.2 Entering Eval Code
        1. 10.4.2.1 Strict Mode Restrictions
      3. 10.4.3 Entering Function Code
    5. 10.5 Declaration Binding Instantiation
    6. 10.6 Arguments Object
  12. 11 Expressions
    1. 11.1 Primary Expressions
      1. 11.1.1 The this Keyword
      2. 11.1.2 Identifier Reference
      3. 11.1.3 Literal Reference
      4. 11.1.4 Array Initialiser
      5. 11.1.5 Object Initialiser
      6. 11.1.6 The Grouping Operator
    2. 11.2 Left-Hand-Side Expressions
      1. 11.2.1 Property Accessors
      2. 11.2.2 The new Operator
      3. 11.2.3 Function Calls
      4. 11.2.4 Argument Lists
      5. 11.2.5 Function Expressions
    3. 11.3 Postfix Expressions
      1. 11.3.1 Postfix Increment Operator
      2. 11.3.2 Postfix Decrement Operator
    4. 11.4 Unary Operators
      1. 11.4.1 The delete Operator
      2. 11.4.2 The void Operator
      3. 11.4.3 The typeof Operator
      4. 11.4.4 Prefix Increment Operator
      5. 11.4.5 Prefix Decrement Operator
      6. 11.4.6 Unary + Operator
      7. 11.4.7 Unary - Operator
      8. 11.4.8 Bitwise NOT Operator ( ~ )
      9. 11.4.9 Logical NOT Operator ( ! )
    5. 11.5 Multiplicative Operators
      1. 11.5.1 Applying the * Operator
      2. 11.5.2 Applying the / Operator
      3. 11.5.3 Applying the % Operator
    6. 11.6 Additive Operators
      1. 11.6.1 The Addition operator ( + )
      2. 11.6.2 The Subtraction Operator ( - )
      3. 11.6.3 Applying the Additive Operators to Numbers
    7. 11.7 Bitwise Shift Operators
      1. 11.7.1 The Left Shift Operator ( << )
      2. 11.7.2 The Signed Right Shift Operator ( >> )
      3. 11.7.3 The Unsigned Right Shift Operator ( >>> )
    8. 11.8 Relational Operators
      1. 11.8.1 The Less-than Operator ( < )
      2. 11.8.2 The Greater-than Operator ( > )
      3. 11.8.3 The Less-than-or-equal Operator ( <= )
      4. 11.8.4 The Greater-than-or-equal Operator ( >= )
      5. 11.8.5 The Abstract Relational Comparison Algorithm
      6. 11.8.6 The instanceof operator
      7. 11.8.7 The in operator
    9. 11.9 Equality Operators
      1. 11.9.1 The Equals Operator ( == )
      2. 11.9.2 The Does-not-equals Operator ( != )
      3. 11.9.3 The Abstract Equality Comparison Algorithm
      4. 11.9.4 The Strict Equals Operator ( === )
      5. 11.9.5 The Strict Does-not-equal Operator ( !== )
      6. 11.9.6 The Strict Equality Comparison Algorithm
    10. 11.10 Binary Bitwise Operators
    11. 11.11 Binary Logical Operators
    12. 11.12 Conditional Operator ( ? : )
    13. 11.13 Assignment Operators
      1. 11.13.1 Simple Assignment ( = )
      2. 11.13.2 Compound Assignment ( op= )
    14. 11.14 Comma Operator ( , )
  13. 12 Statements
    1. 12.1 Block
    2. 12.2 Variable Statement
      1. 12.2.1 Strict Mode Restrictions
    3. 12.3 Empty Statement
    4. 12.4 Expression Statement
    5. 12.5 The if Statement
    6. 12.6 Iteration Statements
      1. 12.6.1 The do-while Statement
      2. 12.6.2 The while Statement
      3. 12.6.3 The for Statement
      4. 12.6.4 The for-in Statement
    7. 12.7 The continue Statement
    8. 12.8 The break Statement
    9. 12.9 The return Statement
    10. 12.10 The with Statement
      1. 12.10.1 Strict Mode Restrictions
    11. 12.11 The switch Statement
    12. 12.12 Labelled Statements
    13. 12.13 The throw Statement
    14. 12.14 The try Statement
      1. 12.14.1 Strict Mode Restrictions
    15. 12.15 The debugger statement
  14. 13 Function Definition
    1. 13.1 Strict Mode Restrictions
    2. 13.2 Creating Function Objects
      1. 13.2.1 [[Call]]
      2. 13.2.2 [[Construct]]
      3. 13.2.3 The Function Object
  15. 14 Program
    1. 14.1 Directive Prologues and the Use Strict Directive
  16. 15 Standard Built-in ECMAScript Objects
    1. 15.1 The Global Object
      1. 15.1.1 Value Properties of the Global Object
        1. 15.1.1.1 NaN
        2. 15.1.1.2 Infinity
        3. 15.1.1.3 undefined
      2. 15.1.2 Function Properties of the Global Object
        1. 15.1.2.1 eval (x)
          1. 15.1.2.1.1 Direct Call to Eval
        2. 15.1.2.2 parseInt (string , radix)
        3. 15.1.2.3 parseFloat (string)
        4. 15.1.2.4 isNaN (number)
        5. 15.1.2.5 isFinite (number)
      3. 15.1.3 URI Handling Function Properties
        1. 15.1.3.1 decodeURI (encodedURI)
        2. 15.1.3.2 decodeURIComponent (encodedURIComponent)
        3. 15.1.3.3 encodeURI (uri)
        4. 15.1.3.4 encodeURIComponent (uriComponent)
      4. 15.1.4 Constructor Properties of the Global Object
        1. 15.1.4.1 Object ( . . . )
        2. 15.1.4.2 Function ( . . . )
        3. 15.1.4.3 Array ( . . . )
        4. 15.1.4.4 String ( . . . )
        5. 15.1.4.5 Boolean ( . . . )
        6. 15.1.4.6 Number ( . . . )
        7. 15.1.4.7 Date ( . . . )
        8. 15.1.4.8 RegExp ( . . . )
        9. 15.1.4.9 Error ( . . . )
        10. 15.1.4.10 EvalError ( . . . )
        11. 15.1.4.11 RangeError ( . . . )
        12. 15.1.4.12 ReferenceError ( . . . )
        13. 15.1.4.13 SyntaxError ( . . . )
        14. 15.1.4.14 TypeError ( . . . )
        15. 15.1.4.15 URIError ( . . . )
      5. 15.1.5 Other Properties of the Global Object
        1. 15.1.5.1 Math
        2. 15.1.5.2 JSON
    2. 15.2 Object Objects
      1. 15.2.1 The Object Constructor Called as a Function
        1. 15.2.1.1 Object ( [ value ] )
      2. 15.2.2 The Object Constructor
        1. 15.2.2.1 new Object ( [ value ] )
      3. 15.2.3 Properties of the Object Constructor
        1. 15.2.3.1 Object.prototype
        2. 15.2.3.2 Object.getPrototypeOf ( O )
        3. 15.2.3.3 Object.getOwnPropertyDescriptor ( O, P )
        4. 15.2.3.4 Object.getOwnPropertyNames ( O )
        5. 15.2.3.5 Object.create ( O [, Properties] )
        6. 15.2.3.6 Object.defineProperty ( O, P, Attributes )
        7. 15.2.3.7 Object.defineProperties ( O, Properties )
        8. 15.2.3.8 Object.seal ( O )
        9. 15.2.3.9 Object.freeze ( O )
        10. 15.2.3.10 Object.preventExtensions ( O )
        11. 15.2.3.11 Object.isSealed ( O )
        12. 15.2.3.12 Object.isFrozen ( O )
        13. 15.2.3.13 Object.isExtensible ( O )
        14. 15.2.3.14 Object.keys ( O )
      4. 15.2.4 Properties of the Object Prototype Object
        1. 15.2.4.1 Object.prototype.constructor
        2. 15.2.4.2 Object.prototype.toString ( )
        3. 15.2.4.3 Object.prototype.toLocaleString ( )
        4. 15.2.4.4 Object.prototype.valueOf ( )
        5. 15.2.4.5 Object.prototype.hasOwnProperty (V)
        6. 15.2.4.6 Object.prototype.isPrototypeOf (V)
        7. 15.2.4.7 Object.prototype.propertyIsEnumerable (V)
      5. 15.2.5 Properties of Object Instances
    3. 15.3 Function Objects
      1. 15.3.1 The Function Constructor Called as a Function
        1. 15.3.1.1 Function (p1, p2, … , pn, body)
      2. 15.3.2 The Function Constructor
        1. 15.3.2.1 new Function (p1, p2, … , pn, body)
      3. 15.3.3 Properties of the Function Constructor
        1. 15.3.3.1 Function.prototype
        2. 15.3.3.2 Function.length
      4. 15.3.4 Properties of the Function Prototype Object
        1. 15.3.4.1 Function.prototype.constructor
        2. 15.3.4.2 Function.prototype.toString ( )
        3. 15.3.4.3 Function.prototype.apply (thisArg, argArray)
        4. 15.3.4.4 Function.prototype.call (thisArg [ , arg1 [ , arg2, … ] ] )
        5. 15.3.4.5 Function.prototype.bind (thisArg [, arg1 [, arg2, …]])
          1. 15.3.4.5.1 [[Call]]
          2. 15.3.4.5.2 [[Construct]]
          3. 15.3.4.5.3 [[HasInstance]] (V)
      5. 15.3.5 Properties of Function Instances
        1. 15.3.5.1 length
        2. 15.3.5.2 prototype
        3. 15.3.5.3 [[HasInstance]] (V)
        4. 15.3.5.4 [[Get]] (P)
    4. 15.4 Array Objects
      1. 15.4.1 The Array Constructor Called as a Function
        1. 15.4.1.1 Array ( [ item1 [ , item2 [ , … ] ] ] )
      2. 15.4.2 The Array Constructor
        1. 15.4.2.1 new Array ( [ item0 [ , item1 [ , … ] ] ] )
        2. 15.4.2.2 new Array (len)
      3. 15.4.3 Properties of the Array Constructor
        1. 15.4.3.1 Array.prototype
        2. 15.4.3.2 Array.isArray ( arg )
      4. 15.4.4 Properties of the Array Prototype Object
        1. 15.4.4.1 Array.prototype.constructor
        2. 15.4.4.2 Array.prototype.toString ( )
        3. 15.4.4.3 Array.prototype.toLocaleString ( )
        4. 15.4.4.4 Array.prototype.concat ( [ item1 [ , item2 [ , … ] ] ] )
        5. 15.4.4.5 Array.prototype.join (separator)
        6. 15.4.4.6 Array.prototype.pop ( )
        7. 15.4.4.7 Array.prototype.push ( [ item1 [ , item2 [ , … ] ] ] )
        8. 15.4.4.8 Array.prototype.reverse ( )
        9. 15.4.4.9 Array.prototype.shift ( )
        10. 15.4.4.10 Array.prototype.slice (start, end)
        11. 15.4.4.11 Array.prototype.sort (comparefn)
        12. 15.4.4.12 Array.prototype.splice (start, deleteCount [ , item1 [ , item2 [ , … ] ] ] )
        13. 15.4.4.13 Array.prototype.unshift ( [ item1 [ , item2 [ , … ] ] ] )
        14. 15.4.4.14 Array.prototype.indexOf ( searchElement [ , fromIndex ] )
        15. 15.4.4.15 Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
        16. 15.4.4.16 Array.prototype.every ( callbackfn [ , thisArg ] )
        17. 15.4.4.17 Array.prototype.some ( callbackfn [ , thisArg ] )
        18. 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )
        19. 15.4.4.19 Array.prototype.map ( callbackfn [ , thisArg ] )
        20. 15.4.4.20 Array.prototype.filter ( callbackfn [ , thisArg ] )
        21. 15.4.4.21 Array.prototype.reduce ( callbackfn [ , initialValue ] )
        22. 15.4.4.22 Array.prototype.reduceRight ( callbackfn [ , initialValue ] )
      5. 15.4.5 Properties of Array Instances
        1. 15.4.5.1 [[DefineOwnProperty]] ( P, Desc, Throw )
        2. 15.4.5.2 length
    5. 15.5 String Objects
      1. 15.5.1 The String Constructor Called as a Function
        1. 15.5.1.1 String ( [ value ] )
      2. 15.5.2 The String Constructor
        1. 15.5.2.1 new String ( [ value ] )
      3. 15.5.3 Properties of the String Constructor
        1. 15.5.3.1 String.prototype
        2. 15.5.3.2 String.fromCharCode ( [ char0 [ , char1 [ , … ] ] ] )
      4. 15.5.4 Properties of the String Prototype Object
        1. 15.5.4.1 String.prototype.constructor
        2. 15.5.4.2 String.prototype.toString ( )
        3. 15.5.4.3 String.prototype.valueOf ( )
        4. 15.5.4.4 String.prototype.charAt (pos)
        5. 15.5.4.5 String.prototype.charCodeAt (pos)
        6. 15.5.4.6 String.prototype.concat ( [ string1 [ , string2 [ , … ] ] ] )
        7. 15.5.4.7 String.prototype.indexOf (searchString, position)
        8. 15.5.4.8 String.prototype.lastIndexOf (searchString, position)
        9. 15.5.4.9 String.prototype.localeCompare (that)
        10. 15.5.4.10 String.prototype.match (regexp)
        11. 15.5.4.11 String.prototype.replace (searchValue, replaceValue)
        12. 15.5.4.12 String.prototype.search (regexp)
        13. 15.5.4.13 String.prototype.slice (start, end)
        14. 15.5.4.14 String.prototype.split (separator, limit)
        15. 15.5.4.15 String.prototype.substring (start, end)
        16. 15.5.4.16 String.prototype.toLowerCase ( )
        17. 15.5.4.17 String.prototype.toLocaleLowerCase ( )
        18. 15.5.4.18 String.prototype.toUpperCase ( )
        19. 15.5.4.19 String.prototype.toLocaleUpperCase ( )
        20. 15.5.4.20 String.prototype.trim ( )
      5. 15.5.5 Properties of String Instances
        1. 15.5.5.1 length
        2. 15.5.5.2 [[GetOwnProperty]] ( P )
    6. 15.6 Boolean Objects
      1. 15.6.1 The Boolean Constructor Called as a Function
        1. 15.6.1.1 Boolean (value)
      2. 15.6.2 The Boolean Constructor
        1. 15.6.2.1 new Boolean (value)
      3. 15.6.3 Properties of the Boolean Constructor
        1. 15.6.3.1 Boolean.prototype
      4. 15.6.4 Properties of the Boolean Prototype Object
        1. 15.6.4.1 Boolean.prototype.constructor
        2. 15.6.4.2 Boolean.prototype.toString ( )
        3. 15.6.4.3 Boolean.prototype.valueOf ( )
      5. 15.6.5 Properties of Boolean Instances
    7. 15.7 Number Objects
      1. 15.7.1 The Number Constructor Called as a Function
        1. 15.7.1.1 Number ( [ value ] )
      2. 15.7.2 The Number Constructor
        1. 15.7.2.1 new Number ( [ value ] )
      3. 15.7.3 Properties of the Number Constructor
        1. 15.7.3.1 Number.prototype
        2. 15.7.3.2 Number.MAX_VALUE
        3. 15.7.3.3 Number.MIN_VALUE
        4. 15.7.3.4 Number.NaN
        5. 15.7.3.5 Number.NEGATIVE_INFINITY
        6. 15.7.3.6 Number.POSITIVE_INFINITY
      4. 15.7.4 Properties of the Number Prototype Object
        1. 15.7.4.1 Number.prototype.constructor
        2. 15.7.4.2 Number.prototype.toString ( [ radix ] )
        3. 15.7.4.3 Number.prototype.toLocaleString()
        4. 15.7.4.4 Number.prototype.valueOf ( )
        5. 15.7.4.5 Number.prototype.toFixed (fractionDigits)
        6. 15.7.4.6 Number.prototype.toExponential (fractionDigits)
        7. 15.7.4.7 Number.prototype.toPrecision (precision)
      5. 15.7.5 Properties of Number Instances
    8. 15.8 The Math Object
      1. 15.8.1 Value Properties of the Math Object
        1. 15.8.1.1 E
        2. 15.8.1.2 LN10
        3. 15.8.1.3 LN2
        4. 15.8.1.4 LOG2E
        5. 15.8.1.5 LOG10E
        6. 15.8.1.6 PI
        7. 15.8.1.7 SQRT1_2
        8. 15.8.1.8 SQRT2
      2. 15.8.2 Function Properties of the Math Object
        1. 15.8.2.1 abs (x)
        2. 15.8.2.2 acos (x)
        3. 15.8.2.3 asin (x)
        4. 15.8.2.4 atan (x)
        5. 15.8.2.5 atan2 (y, x)
        6. 15.8.2.6 ceil (x)
        7. 15.8.2.7 cos (x)
        8. 15.8.2.8 exp (x)
        9. 15.8.2.9 floor (x)
        10. 15.8.2.10 log (x)
        11. 15.8.2.11 max ( [ value1 [ , value2 [ , … ] ] ] )
        12. 15.8.2.12 min ( [ value1 [ , value2 [ , … ] ] ] )
        13. 15.8.2.13 pow (x, y)
        14. 15.8.2.14 random ( )
        15. 15.8.2.15 round (x)
        16. 15.8.2.16 sin (x)
        17. 15.8.2.17 sqrt (x)
        18. 15.8.2.18 tan (x)
    9. 15.9 Date Objects
      1. 15.9.1 Overview of Date Objects and Definitions of Abstract Operators
        1. 15.9.1.1 Time Values and Time Range
        2. 15.9.1.2 Day Number and Time within Day
        3. 15.9.1.3 Year Number
        4. 15.9.1.4 Month Number
        5. 15.9.1.5 Date Number
        6. 15.9.1.6 Week Day
        7. 15.9.1.7 Local Time Zone Adjustment
        8. 15.9.1.8 Daylight Saving Time Adjustment
        9. 15.9.1.9 Local Time
        10. 15.9.1.10 Hours, Minutes, Second, and Milliseconds
        11. 15.9.1.11 MakeTime (hour, min, sec, ms)
        12. 15.9.1.12 MakeDay (year, month, date)
        13. 15.9.1.13 MakeDate (day, time)
        14. 15.9.1.14 TimeClip (time)
        15. 15.9.1.15 Date Time String Format
          1. 15.9.1.15.1 Extended years
      2. 15.9.2 The Date Constructor Called as a Function
        1. 15.9.2.1 Date ( [ year [, month [, date [, hours [, minutes [, seconds [, ms ] ] ] ] ] ] ] )
      3. 15.9.3 The Date Constructor
        1. 15.9.3.1 new Date (year, month [, date [, hours [, minutes [, seconds [, ms ] ] ] ] ] )
        2. 15.9.3.2 new Date (value)
        3. 15.9.3.3 new Date ( )
      4. 15.9.4 Properties of the Date Constructor
        1. 15.9.4.1 Date.prototype
        2. 15.9.4.2 Date.parse (string)
        3. 15.9.4.3 Date.UTC (year, month [, date [, hours [, minutes [, seconds [, ms ] ] ] ] ])
        4. 15.9.4.4 Date.now ( )
      5. 15.9.5 Properties of the Date Prototype Object
        1. 15.9.5.1 Date.prototype.constructor
        2. 15.9.5.2 Date.prototype.toString ( )
        3. 15.9.5.3 Date.prototype.toDateString ( )
        4. 15.9.5.4 Date.prototype.toTimeString ( )
        5. 15.9.5.5 Date.prototype.toLocaleString ( )
        6. 15.9.5.6 Date.prototype.toLocaleDateString ( )
        7. 15.9.5.7 Date.prototype.toLocaleTimeString ( )
        8. 15.9.5.8 Date.prototype.valueOf ( )
        9. 15.9.5.9 Date.prototype.getTime ( )
        10. 15.9.5.10 Date.prototype.getFullYear ( )
        11. 15.9.5.11 Date.prototype.getUTCFullYear ( )
        12. 15.9.5.12 Date.prototype.getMonth ( )
        13. 15.9.5.13 Date.prototype.getUTCMonth ( )
        14. 15.9.5.14 Date.prototype.getDate ( )
        15. 15.9.5.15 Date.prototype.getUTCDate ( )
        16. 15.9.5.16 Date.prototype.getDay ( )
        17. 15.9.5.17 Date.prototype.getUTCDay ( )
        18. 15.9.5.18 Date.prototype.getHours ( )
        19. 15.9.5.19 Date.prototype.getUTCHours ( )
        20. 15.9.5.20 Date.prototype.getMinutes ( )
        21. 15.9.5.21 Date.prototype.getUTCMinutes ( )
        22. 15.9.5.22 Date.prototype.getSeconds ( )
        23. 15.9.5.23 Date.prototype.getUTCSeconds ( )
        24. 15.9.5.24 Date.prototype.getMilliseconds ( )
        25. 15.9.5.25 Date.prototype.getUTCMilliseconds ( )
        26. 15.9.5.26 Date.prototype.getTimezoneOffset ( )
        27. 15.9.5.27 Date.prototype.setTime (time)
        28. 15.9.5.28 Date.prototype.setMilliseconds (ms)
        29. 15.9.5.29 Date.prototype.setUTCMilliseconds (ms)
        30. 15.9.5.30 Date.prototype.setSeconds (sec [, ms ] )
        31. 15.9.5.31 Date.prototype.setUTCSeconds (sec [, ms ] )
        32. 15.9.5.32 Date.prototype.setMinutes (min [, sec [, ms ] ] )
        33. 15.9.5.33 Date.prototype.setUTCMinutes (min [, sec [, ms ] ] )
        34. 15.9.5.34 Date.prototype.setHours (hour [, min [, sec [, ms ] ] ] )
        35. 15.9.5.35 Date.prototype.setUTCHours (hour [, min [, sec [, ms ] ] ] )
        36. 15.9.5.36 Date.prototype.setDate (date)
        37. 15.9.5.37 Date.prototype.setUTCDate (date)
        38. 15.9.5.38 Date.prototype.setMonth (month [, date ] )
        39. 15.9.5.39 Date.prototype.setUTCMonth (month [, date ] )
        40. 15.9.5.40 Date.prototype.setFullYear (year [, month [, date ] ] )
        41. 15.9.5.41 Date.prototype.setUTCFullYear (year [, month [, date ] ] )
        42. 15.9.5.42 Date.prototype.toUTCString ( )
        43. 15.9.5.43 Date.prototype.toISOString ( )
        44. 15.9.5.44 Date.prototype.toJSON ( key )
      6. 15.9.6 Properties of Date Instances
    10. 15.10 RegExp (Regular Expression) Objects
      1. 15.10.1 Patterns
      2. 15.10.2 Pattern Semantics
        1. 15.10.2.1 Notation
        2. 15.10.2.2 Pattern
        3. 15.10.2.3 Disjunction
        4. 15.10.2.4 Alternative
        5. 15.10.2.5 Term
        6. 15.10.2.6 Assertion
        7. 15.10.2.7 Quantifier
        8. 15.10.2.8 Atom
        9. 15.10.2.9 AtomEscape
        10. 15.10.2.10 CharacterEscape
        11. 15.10.2.11 DecimalEscape
        12. 15.10.2.12 CharacterClassEscape
        13. 15.10.2.13 CharacterClass
        14. 15.10.2.14 ClassRanges
        15. 15.10.2.15 NonemptyClassRanges
        16. 15.10.2.16 NonemptyClassRangesNoDash
        17. 15.10.2.17 ClassAtom
        18. 15.10.2.18 ClassAtomNoDash
        19. 15.10.2.19 ClassEscape
      3. 15.10.3 The RegExp Constructor Called as a Function
        1. 15.10.3.1 RegExp(pattern, flags)
      4. 15.10.4 The RegExp Constructor
        1. 15.10.4.1 new RegExp(pattern, flags)
      5. 15.10.5 Properties of the RegExp Constructor
        1. 15.10.5.1 RegExp.prototype
      6. 15.10.6 Properties of the RegExp Prototype Object
        1. 15.10.6.1 RegExp.prototype.constructor
        2. 15.10.6.2 RegExp.prototype.exec(string)
        3. 15.10.6.3 RegExp.prototype.test(string)
        4. 15.10.6.4 RegExp.prototype.toString()
      7. 15.10.7 Properties of RegExp Instances
        1. 15.10.7.1 source
        2. 15.10.7.2 global
        3. 15.10.7.3 ignoreCase
        4. 15.10.7.4 multiline
        5. 15.10.7.5 lastIndex
    11. 15.11 Error Objects
      1. 15.11.1 The Error Constructor Called as a Function
        1. 15.11.1.1 Error (message)
      2. 15.11.2 The Error Constructor
        1. 15.11.2.1 new Error (message)
      3. 15.11.3 Properties of the Error Constructor
        1. 15.11.3.1 Error.prototype
      4. 15.11.4 Properties of the Error Prototype Object
        1. 15.11.4.1 Error.prototype.constructor
        2. 15.11.4.2 Error.prototype.name
        3. 15.11.4.3 Error.prototype.message
        4. 15.11.4.4 Error.prototype.toString ( )
      5. 15.11.5 Properties of Error Instances
      6. 15.11.6 Native Error Types Used in This Standard
        1. 15.11.6.1 EvalError
        2. 15.11.6.2 RangeError
        3. 15.11.6.3 ReferenceError
        4. 15.11.6.4 SyntaxError
        5. 15.11.6.5 TypeError
        6. 15.11.6.6 URIError
      7. 15.11.7 NativeError Object Structure
        1. 15.11.7.1 NativeError Constructors Called as Functions
        2. 15.11.7.2 NativeError (message)
        3. 15.11.7.3 The NativeError Constructors
        4. 15.11.7.4 New NativeError (message)
        5. 15.11.7.5 Properties of the NativeError Constructors
        6. 15.11.7.6 NativeError.prototype
        7. 15.11.7.7 Properties of the NativeError Prototype Objects
        8. 15.11.7.8 NativeError.prototype.constructor
        9. 15.11.7.9 NativeError.prototype.name
        10. 15.11.7.10 NativeError.prototype.message
        11. 15.11.7.11 Properties of NativeError Instances
    12. 15.12 The JSON Object
      1. 15.12.1 The JSON Grammar
        1. 15.12.1.1 The JSON Lexical Grammar
        2. 15.12.1.2 The JSON Syntactic Grammar
      2. 15.12.2 parse ( text [ , reviver ] )
      3. 15.12.3 stringify ( value [ , replacer [ , space ] ] )
  17. 16 Errors
  18. Annex A (informative) Grammar Summary
    1. A.1 Lexical Grammar
    2. A.2 Number Conversions
    3. A.3 Expressions
    4. A.4 Statements
    5. A.5 Functions and Programs
    6. A.6 Universal Resource Identifier Character Classes
    7. A.7 Regular Expressions
    8. A.8 JSON
      1. A.8.1 JSON Lexical Grammar
      2. A.8.2 JSON Syntactic Grammar
  19. Annex B (informative) Compatibility
    1. B.1 Additional Syntax
      1. B.1.1 Numeric Literals
      2. B.1.2 String Literals
    2. B.2 Additional Properties
      1. B.2.1 escape (string)
      2. B.2.2 unescape (string)
      3. B.2.3 String.prototype.substr (start, length)
      4. B.2.4 Date.prototype.getYear ( )
      5. B.2.5 Date.prototype.setYear (year)
      6. B.2.6 Date.prototype.toGMTString ( )
  20. Annex C (informative) The Strict Mode of ECMAScript
  21. Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact
  22. Annex E (informative) Additions and Changes in the 5th Edition that Introduce Incompatibilities with the 3rd Edition
  23. Bibliography

"DISCLAIMER

This document may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International.

The limited permissions are granted through the standardization phase and will not be revoked by Ecma International or its successors or assigns during this time.

This document and the information contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."