?uem/p1-90`Arrays are
The Array
Array(…) is equivalent to the object creation expression new Array(…) with the same arguments.extends clause of a class definition. Subclass super call to the Array Array.prototype This
The Array
This
This
This async
This
This
This
This
The value of Array.prototype is the
This property has the
Array[%Symbol.species%] is an
The value of the
Array
The Array prototype object:
The Array prototype object is specified to be an
This
It performs the following steps when called:
The
The explicit setting of the
The abstract operation IsConcatSpreadable takes argument obj (an
The initial value of Array.prototype.constructor is
The end argument is optional. If it is not provided, the length of the
If target is negative, it is treated as
This
This
callback should be a every calls callback once for each element present in the array, in ascending order, until it finds one where callback returns every immediately returns every returns
If a thisArg parameter is provided, it will be used as the
callback is called with three arguments: the value of the element, the index of the element, and the object being traversed.
every does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by every is set before the first call to callback. Elements which are appended to the array after the call to every begins will not be visited by callback. If existing elements of the array are changed, their value as passed to callback will be the value at the time every visits them; elements that are deleted after the call to every begins and before being visited are not visited. every acts like the “for all” quantifier in mathematics. In particular, for an empty array, it returns
This
The start argument is optional. If it is not provided,
The end argument is optional. If it is not provided, the length of the
If start is negative, it is treated as
This
callback should be a filter calls callback once for each element in the array, in ascending order, and constructs a new array of all the values for which callback returns
If a thisArg parameter is provided, it will be used as the
callback is called with three arguments: the value of the element, the index of the element, and the object being traversed.
filter does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by filter is set before the first call to callback. Elements which are appended to the array after the call to filter begins will not be visited by callback. If existing elements of the array are changed their value as passed to callback will be the value at the time filter visits them; elements that are deleted after the call to filter begins and before being visited are not visited.
This
This find immediately returns that element value. Otherwise, find returns
See
This
This findIndex immediately returns the index of that element value. Otherwise, findIndex returns -1.
See
This
This findLast immediately returns that element value. Otherwise, findLast returns
See
This
This findLastIndex immediately returns the index of that element value. Otherwise, findLastIndex returns -1.
See
This
The abstract operation FindViaPredicate takes arguments obj (an Object), length (a non-negative
obj should be an
predicate should be a
thisArg will be used as the
This operation does not directly mutate the object on which it is called, but the object may be mutated by the calls to predicate.
The range of elements processed is set before the first call to predicate, just before the traversal begins. Elements that are appended to the array after this will not be visited by predicate. If existing elements of the array are changed, their value as passed to predicate will be the value at the time that this operation visits them. Elements that are deleted after traversal begins and before being visited are still visited and are either looked up from the
It performs the following steps when called:
This
The abstract operation FlattenIntoArray takes arguments target (an Object), source (an Object), sourceLength (a non-negative
This
callback should be a forEach calls callback once for each element present in the array, in ascending order. callback is called only for elements of the array which actually exist; it is not called for missing elements of the array.
If a thisArg parameter is provided, it will be used as the
callback is called with three arguments: the value of the element, the index of the element, and the object being traversed.
forEach does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by forEach is set before the first call to callback. Elements which are appended to the array after the call to forEach begins will not be visited by callback. If existing elements of the array are changed, their value as passed to callback will be the value at the time forEach visits them; elements that are deleted after the call to forEach begins and before being visited are not visited.
This
This
The optional second argument fromIndex defaults to
This
This indexOf
This
The optional second argument fromIndex defaults to
This
This
It performs the following steps when called:
The abstract operation JoinIndexedProperties takes arguments obj (an Object), length (a non-negative
The methodArgs parameter is intended for use by other specifications that rely upon this operation, such as ECMA-402.
This
This
The optional second argument fromIndex defaults to the array's length minus one (i.e. the whole array is searched). If it is greater than or equal to the length of the array, the whole array will be searched. If it is less than
This
callback should be a map calls callback once for each element in the array, in ascending order, and constructs a new Array from the results. callback is called only for elements of the array which actually exist; it is not called for missing elements of the array.
If a thisArg parameter is provided, it will be used as the
callback is called with three arguments: the value of the element, the index of the element, and the object being traversed.
map does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by map is set before the first call to callback. Elements which are appended to the array after the call to map begins will not be visited by callback. If existing elements of the array are changed, their value as passed to callback will be the value at the time map visits them; elements that are deleted after the call to map begins and before being visited are not visited.
This
This
This
This
This
The
callback should be a reduce calls callback once for each element present in the array, in ascending order, skipping the first element unless initialValue is provided.
callback is called with four arguments: the previousValue (value from the previous call to callback), the currentValue (value of the current element), the currentIndex, and the object being traversed. The first time that callback is called, the previousValue and currentValue can be one of two values. If an initialValue was supplied in the call to reduce, then previousValue will be initialValue and currentValue will be the first value in the array. If no initialValue was supplied, then previousValue will be the first value in the array and currentValue will be the second. It is a
reduce does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by reduce is set before the first call to callback. Elements that are appended to the array after the call to reduce begins will not be visited by callback. If existing elements of the array are changed, their value as passed to callback will be the value at the time reduce visits them; elements that are deleted after the call to reduce begins and before being visited are not visited.
This
callback should be a reduceRight calls callback once for each element present in the array, in descending order, skipping the first call unless initialValue is provided.
callback is called with four arguments: the previousValue (value from the previous call to callback), the currentValue (value of the current element), the currentIndex, and the object being traversed. The first time the reduceRight, then previousValue will be initialValue and currentValue will be the last value in the array. If no initialValue was supplied, then previousValue will be the last value in the array and currentValue will be the second-to-last value. It is a
reduceRight does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by reduceRight is set before the first call to callback. Elements that are appended to the array after the call to reduceRight begins will not be visited by callback. If existing elements of the array are changed by callback, their value as passed to callback will be the value at the time reduceRight visits them; elements that are deleted after the call to reduceRight begins and before being visited are not visited.
This
This
This
This
It performs the following steps when called:
This
It performs the following steps when called:
The explicit setting of the
callback should be a some calls callback once for each element present in the array, in ascending order, until it finds one where callback returns some immediately returns some returns
If a thisArg parameter is provided, it will be used as the
callback is called with three arguments: the value of the element, the index of the element, and the object being traversed.
some does not directly mutate the object on which it is called but the object may be mutated by the calls to callback.
The range of elements processed by some is set before the first call to callback. Elements that are appended to the array after the call to some begins will not be visited by callback. If existing elements of the array are changed, their value as passed to callback will be the value at the time that some visits them; elements that are deleted after the call to some begins and before being visited are not visited. some acts like the “exists” quantifier in mathematics. In particular, for an empty array, it returns
This
This
It performs the following steps when called:
Because non-existent property values always compare greater than
The abstract operation SortIndexedProperties takes arguments obj (an Object), length (a non-negative
The sort order is the ordering of items after completion of step
Unless the
Here the notation
An
The above conditions are necessary and sufficient to ensure that comparator divides the set values into equivalence classes and that these equivalence classes are totally ordered.
The abstract operation CompareArrayElements takes arguments x (an
This
This
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement this
The first edition of ECMA-402 did not include a replacement specification for this
The meanings of the optional parameters to this
This
This toString except that it is intended to yield a locale-sensitive result corresponding with conventions of the
The
This
This
This
This
This
It performs the following steps when called:
The
This
This
The initial value of the
The initial value of the
This property has the
The Array.prototype prior to the ECMAScript 2015 specification. These names are ignored for with statement binding purposes in order to preserve the behaviour of existing code that might use one of these names as a binding in an outer scope that is shadowed by a with statement whose binding object is an Array.
The reason that
Array instances are
Array instances have a
The
The
Reducing the value of the
An Array Iterator is an object that represents a specific iteration over some specific Array instance object. There is not a named
The abstract operation CreateArrayIterator takes arguments array (an Object) and kind (
The %ArrayIteratorPrototype% object:
The initial value of the
This property has the
| Internal Slot | Type | Description |
|---|---|---|
| [[IteratedArrayLike]] |
an Object or |
The |
| [[ArrayLikeNextIndex]] |
a non-negative |
The |
| [[ArrayLikeIterationKind]] |
|
A value that identifies what is returned for each element of the iteration. |
A TypedArray presents an array-like view of an underlying binary data buffer (
|
|
Element Type | Element Size | Conversion Operation | Description |
|---|---|---|---|---|
|
Int8Array %Int8Array% |
|
1 |
|
8-bit two's complement signed |
|
Uint8Array %Uint8Array% |
|
1 |
|
8-bit unsigned |
|
Uint8ClampedArray %Uint8ClampedArray% |
|
1 |
|
8-bit unsigned |
|
Int16Array %Int16Array% |
|
2 |
|
16-bit two's complement signed |
|
Uint16Array %Uint16Array% |
|
2 |
|
16-bit unsigned |
|
Int32Array %Int32Array% |
|
4 |
|
32-bit two's complement signed |
|
Uint32Array %Uint32Array% |
|
4 |
|
32-bit unsigned |
|
BigInt64Array %BigInt64Array% |
|
8 |
|
64-bit two's complement signed |
|
BigUint64Array %BigUint64Array% |
|
8 |
|
64-bit unsigned |
|
Float16Array %Float16Array% |
|
2 | 16-bit IEEE floating point | |
|
Float32Array %Float32Array% |
|
4 | 32-bit IEEE floating point | |
|
Float64Array %Float64Array% |
|
8 | 64-bit IEEE floating point |
In the definitions below, references to TypedArray should be replaced with the appropriate
The %TypedArray% intrinsic object:
super call to it.This
The
The
This
This
The initial value of .prototype is the
This property has the
[%Symbol.species%] is an
The value of the
The %TypedArray% prototype object:
.prototype.buffer is an
.prototype.byteLength is an
.prototype.byteOffset is an
The initial value of .prototype.constructor is
The interpretation and use of the arguments of this Array.prototype.copyWithin as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.every as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.fill as defined in
This
The interpretation and use of the arguments of this Array.prototype.filter as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.find as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.findIndex as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.findLast as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.findLastIndex as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.forEach as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.includes as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.indexOf as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.join as defined in
This
This
This
The interpretation and use of the arguments of this Array.prototype.lastIndexOf as defined in
This
This
.prototype.length is an
This
The interpretation and use of the arguments of this Array.prototype.map as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.reduce as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.reduceRight as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.reverse as defined in
This
This
This
It performs the following steps when called:
This
The abstract operation SetTypedArrayFromArrayLike takes arguments target (a
The abstract operation SetTypedArrayFromTypedArray takes arguments target (a
The interpretation and use of the arguments of this Array.prototype.slice as defined in
This
This
The interpretation and use of the arguments of this Array.prototype.some as defined in
This
This
This is a distinct Array.prototype.sort as defined in
This
It performs the following steps when called:
Because
This
It performs the following steps when called:
This
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement this
The interpretation and use of the arguments of this Array.prototype.toLocaleString as defined in
This
This
This
The initial value of the
This
This
The initial value of the
.prototype[%Symbol.toStringTag%] is an
This property has the
The initial value of the
The abstract operation TypedArrayCreateFromConstructor takes arguments ctor (a
The abstract operation TypedArrayCreateSameType takes arguments exemplar (a
The abstract operation TypedArraySpeciesCreate takes arguments exemplar (a
The abstract operation ValidateTypedArray takes arguments obj (an
The abstract operation ValidateTypedArrayBounds takes arguments ta (a
The abstract operation TypedArrayElementSize takes argument obj (a
The abstract operation TypedArrayElementType takes argument obj (a
The abstract operation CompareTypedArrayElements takes arguments x (a Number or a BigInt), y (a Number or a BigInt), and comparator (a
Each TypedArray
extends clause of a class definition. Subclass super call to the TypedArray .prototype.Each TypedArray
"%TypedArray.prototype%".The abstract operation AllocateTypedArray takes arguments ctorName (a String which is the name of a
The abstract operation InitializeTypedArrayFromTypedArray takes arguments obj (a
The abstract operation InitializeTypedArrayFromArrayBuffer takes arguments obj (a
The abstract operation InitializeTypedArrayFromElements takes arguments obj (a
The abstract operation AllocateTypedArrayBuffer takes arguments obj (a
Each TypedArray
The value of TypedArray.BYTES_PER_ELEMENT is the Element Size value specified in
This property has the
The initial value of TypedArray.prototype is the corresponding TypedArray
This property has the
Each TypedArray
The value of TypedArray.prototype.BYTES_PER_ELEMENT is the Element Size value specified in
This property has the
The initial value of the
TypedArray instances are
A Uint8Array is a particular kind of TypedArray as described above. In addition, there are additional
The abstract operation ValidateUint8Array takes argument ta (an
The abstract operation GetUint8ArrayBytes takes argument ta (a Uint8Array) and returns either a
The abstract operation SetUint8ArrayBytes takes arguments into (a Uint8Array) and bytes (a
The abstract operation SkipAsciiWhitespace takes arguments string (a String) and index (a non-negative
The abstract operation DecodeFinalBase64Chunk takes arguments chunk (a String of length 2 or 3) and throwOnExtraBits (a Boolean) and returns either a
The abstract operation DecodeFullLengthBase64Chunk takes argument chunk (a String of length 4) and returns a
The standard base64 alphabet is
The abstract operation FromBase64 takes arguments string (a String), alphabet (
The abstract operation FromHex takes argument string (a String) and optional argument maxLength (a non-negative