ECMAScript® 2024 Language Specification

Draft ECMA-262 / February 15, 2024

Introduction

Main Content

  1. Scope
  2. Conformance
  3. Normative References
  4. Overview
    1. Web Scripting
    2. Hosts and Implementations
    3. ECMAScript Overview
    4. Terms and Definitions
    5. Organization of This Specification
  5. Notational Conventions
    1. Syntactic and Lexical Grammars
    2. Algorithm Conventions
  6. ECMAScript Data Types and Values
    1. ECMAScript Language Types
    2. ECMAScript Specification Types
  7. Abstract Operations
    1. Type Conversion
    2. Testing and Comparison Operations
    3. Operations on Objects
    4. Operations on Iterator Objects
  8. Syntax-Directed Operations
    1. Runtime Semantics: Evaluation
    2. Scope Analysis
    3. Labels
    4. Function Name Inference
    5. Contains
    6. Miscellaneous
  9. Executable Code and Execution Contexts
    1. Environment Records
    2. PrivateEnvironment Records
    3. Realms
    4. Execution Contexts
    5. Jobs and Host Operations to Enqueue Jobs
    6. InitializeHostDefinedRealm ( )
    7. Agents
    8. Agent Clusters
    9. Forward Progress
    10. Processing Model of WeakRef and FinalizationRegistry Targets
    11. ClearKeptObjects ( )
    12. AddToKeptObjects ( value )
    13. CleanupFinalizationRegistry ( finalizationRegistry )
    14. CanBeHeldWeakly ( v )
  10. Ordinary and Exotic Objects Behaviours
    1. Ordinary Object Internal Methods and Internal Slots
    2. ECMAScript Function Objects
    3. Built-in Function Objects
    4. Built-in Exotic Object Internal Methods and Slots
    5. Proxy Object Internal Methods and Internal Slots
  11. ECMAScript Language: Source Text
    1. Source Text
    2. Types of Source Code
  12. ECMAScript Language: Lexical Grammar
    1. Unicode Format-Control Characters
    2. White Space
    3. Line Terminators
    4. Comments
    5. Hashbang Comments
    6. Tokens
    7. Names and Keywords
    8. Punctuators
    9. Literals
    10. Automatic Semicolon Insertion
  13. ECMAScript Language: Expressions
    1. Identifiers
    2. Primary Expression
    3. Left-Hand-Side Expressions
    4. Update Expressions
    5. Unary Operators
    6. Exponentiation Operator
    7. Multiplicative Operators
    8. Additive Operators
    9. Bitwise Shift Operators
    10. Relational Operators
    11. Equality Operators
    12. Binary Bitwise Operators
    13. Binary Logical Operators
    14. Conditional Operator ( ? : )
    15. Assignment Operators
    16. Comma Operator ( , )
  14. ECMAScript Language: Statements and Declarations
    1. Statement Semantics
    2. Block
    3. Declarations and the Variable Statement
    4. Empty Statement
    5. Expression Statement
    6. The if Statement
    7. Iteration Statements
    8. The continue Statement
    9. The break Statement
    10. The return Statement
    11. The with Statement
    12. The switch Statement
    13. Labelled Statements
    14. The throw Statement
    15. The try Statement
    16. The debugger Statement
  15. ECMAScript Language: Functions and Classes
    1. Parameter Lists
    2. Function Definitions
    3. Arrow Function Definitions
    4. Method Definitions
    5. Generator Function Definitions
    6. Async Generator Function Definitions
    7. Class Definitions
    8. Async Function Definitions
    9. Async Arrow Function Definitions
    10. Tail Position Calls
  16. ECMAScript Language: Scripts and Modules
    1. Scripts
    2. Modules
  17. Error Handling and Language Extensions
  18. ECMAScript Standard Built-in Objects
  19. The Global Object
    1. Value Properties of the Global Object
    2. Function Properties of the Global Object
    3. Constructor Properties of the Global Object
    4. Other Properties of the Global Object
  20. Fundamental Objects
    1. Object Objects
    2. Function Objects
    3. Boolean Objects
    4. Symbol Objects
    5. Error Objects
  21. Numbers and Dates
    1. Number Objects
    2. BigInt Objects
    3. The Math Object
    4. Date Objects
  22. Text Processing
    1. String Objects
    2. RegExp (Regular Expression) Objects
  23. Indexed Collections
    1. Array Objects
    2. TypedArray Objects
  24. Keyed Collections
    1. Map Objects
    2. Set Objects
    3. WeakMap Objects
    4. WeakSet Objects
  25. Structured Data
    1. ArrayBuffer Objects
    2. SharedArrayBuffer Objects
    3. DataView Objects
    4. The Atomics Object
    5. The JSON Object
  26. Managing Memory
    1. WeakRef Objects
    2. FinalizationRegistry Objects
  27. Control Abstraction Objects
    1. Iteration
    2. Promise Objects
    3. GeneratorFunction Objects
    4. AsyncGeneratorFunction Objects
    5. Generator Objects
    6. AsyncGenerator Objects
    7. AsyncFunction Objects
  28. Reflection
    1. The Reflect Object
    2. Proxy Objects
    3. Module Namespace Objects
  29. Memory Model
    1. Memory Model Fundamentals
    2. Agent Events Records
    3. Chosen Value Records
    4. Candidate Executions
    5. Abstract Operations for the Memory Model
    6. Relations of Candidate Executions
    7. Properties of Valid Executions
    8. Races
    9. Data Races
    10. Data Race Freedom
    11. Shared Memory Guidelines

Appendix

  1. Grammar Summary
    1. Lexical Grammar
    2. Expressions
    3. Statements
    4. Functions and Classes
    5. Scripts and Modules
    6. Number Conversions
    7. Time Zone Offset String Format
    8. Regular Expressions
  2. Additional ECMAScript Features for Web Browsers
    1. Additional Syntax
    2. Additional Built-in Properties
    3. Other Additional Features
  3. The Strict Mode of ECMAScript
  4. Host Layering Points
  5. Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact
  6. Additions and Changes That Introduce Incompatibilities with Prior Editions
  7. Colophon
  8. Bibliography
  9. Copyright & Software License