Built in Objects
- A primitive value is a member of one of the following built-in types: Undefined, Null, Boolean, Number, String, and Symbol
- an object is a member of the built-in type Object; and a function is a callable object. A function that is associated with an object via a property is called a method.
- These built-in objects include the global object; objects that are fundamental to the runtime semantics of the language including: Object, Function, Boolean, Symbol, and various Error objects;
- objects that represent and manipulate numeric values including Math, Number, and Date;
- the text processing objects String and RegExp;
- objects that are indexed collections of values including Array and nine different kinds of Typed Arrays whose elements all have a specific numeric data representation;
- keyed collections including Map and Set objects;
- objects supporting structured data including the JSON object, ArrayBuffer, SharedArrayBuffer, and DataView;
- objects supporting control abstractions including generator functions and Promise objects; and reflection objects including Proxy and Reflect.
- operators include various unary operations, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, binary bitwise operators, binary logical operators, assignment operators, and the comma operator.
- programs are supported by modules which allow a program to be divided into multiple sequences of statements and declarations.
- Each module explicitly identifies declarations it uses that need to be provided by other modules and which of its declarations are available for use by other modules.
- Objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial 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. Objects are created by using constructors in new expressions
- Every object created by a constructor has an implicit reference (called the object’s prototype) to the value of its constructor’s “prototype” property which may have a non-null implicit reference to its prototype; this is called the prototype chain. When a reference 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. In other words, first the object mentioned directly is examined for such a property; if that object contains the named property, that is the property to which the reference refers; if that object does not contain the named property, the prototype for that object is examined next; and so on.
- properties can be added to objects dynamically by assigning values to them. That is, constructors are not required to name or assign values to all or any of the constructed object’s properties