J.D.B. DIASOLUKA Nz. Luyalu
JavaScript Tome-V
Bref aperçu sur les objets 5 / 102 vendredi, 31. mai 2019
CHAPITRE 5 : BREF APERÇU SUR LES OBJETS :
ECMA définit un « Object » comme ceci :
An Object is logically a collection of properties. Each property is ei-
ther a data property, or an accessor property:
A data property associates a key value with an ECMAScript
language value and a set of Boolean attributes.
An accessor property associates a key value with one or two
accessor functions, and a set of Boolean attributes. The acces-
sor functions are used to store or retrieve an ECMAScript lan-
guage value that is associated with the property.
Properties are identified using key values. A property key value is
either an ECMAScript String value or a Symbol value. All String and
Symbol values, including the empty string, are valid as property
keys. A property name is a property key that is a String value.
An integer index is a String-valued property key that is a canonical
numeric String (see 7.1.16) and whose numeric value is either +0 or
a positive integer ≤ 253 - 1. An array index is an integer index whose
numeric value i is in the range +0 ≤ i < 232 - 1.
Property keys are used to access properties and their values. There
are two kinds of access for properties: get and set, corresponding to
value retrieval and assignment, respectively. The properties acces-
sible via get and set access includes both own properties that are a
direct part of an object and inherited properties which are provided
by another associated object via a property inheritance relationship.
Inherited properties may be either own or inherited properties of
the associated object. Each own property of an object must each
have a key value that is distinct from the key values of the other own
properties of that object.