Properties

Link copied to clipboard
abstract val buffer: ArrayBufferLike
Link copied to clipboard
open override val byteLength: Int
Link copied to clipboard
abstract val byteOffset: Int
Link copied to clipboard

The size in bytes of each element in the array.

Link copied to clipboard
abstract val length: Int

Functions

Link copied to clipboard
fun <T> ArrayLike<T>.asList(): List<T>
Link copied to clipboard
fun at(index: Int): T?

Returns the item located at the specified index.

Link copied to clipboard
fun copyWithin(target: Int, start: Int, end: Int = definedExternally): S

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Link copied to clipboard
open override fun entries(): JsIterator<JsTuple2<Int, T>>
Link copied to clipboard
fun every(predicate: (value: T) -> Unit): Boolean

Determines whether all the members of an array satisfy the specified test.

Link copied to clipboard
fun fill(value: T, start: Int = definedExternally, end: Int = definedExternally): S

Changes all array elements from start to end index to a static value and returns the modified array

Link copied to clipboard
fun filter(predicate: (value: T) -> Boolean): S

Returns the elements of an array that meet the condition specified in a callback function.

Link copied to clipboard
fun find(predicate: (value: T) -> Boolean): T?

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

Link copied to clipboard
fun findIndex(predicate: (value: T) -> Boolean): Int

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

Link copied to clipboard
open override fun forEach(action: (item: T) -> Unit)

Performs the specified action for each element in an array.

Link copied to clipboard
open operator fun get(index: Int): T
open operator fun get(key: Symbol.iterator): () -> JsIterator<T>
Link copied to clipboard
fun includes(searchElement: T, fromIndex: Int = definedExternally): Boolean

Determines whether an array includes a certain element, returning true or false as appropriate.

Link copied to clipboard
fun indexOf(searchElement: T, fromIndex: Int = definedExternally): Int

Returns the index of the first occurrence of a value in an array.

Link copied to clipboard
open inline operator fun iterator(): Iterator<T>
Link copied to clipboard
fun join(separator: String = definedExternally): String

Adds all the elements of an array separated by the specified separator string.

Link copied to clipboard
open override fun keys(): JsIterator<Int>
Link copied to clipboard
fun lastIndexOf(searchElement: T, fromIndex: Int = definedExternally): Int

Returns the index of the last occurrence of a value in an array.

Link copied to clipboard
fun map(transform: (value: T) -> T): S

Calls a defined callback function on each element of an array, and returns an array that contains the results.

Link copied to clipboard
fun reverse(): S

Reverses the elements in an Array.

Link copied to clipboard
open operator fun set(index: Int, value: T)
fun set(array: S, offset: Int = definedExternally)
fun set(array: ReadonlyArray<T>, offset: Int = definedExternally)
Link copied to clipboard
fun slice(start: Int = definedExternally, end: Int = definedExternally): S

Returns a section of an array.

Link copied to clipboard
fun some(predicate: (value: T) -> Boolean): Boolean

Determines whether the specified callback function returns true for any element of an array.

Link copied to clipboard
fun sort(comparison: (a: T, b: T) -> Int = definedExternally): S

Sorts an array.

Link copied to clipboard
fun subarray(start: Int, end: Int): S
Link copied to clipboard

Converts a number to a string by using the current locale.

Link copied to clipboard
fun valueOf(): S

Returns the primitive value of the specified object.

Link copied to clipboard
open override fun values(): JsIterator<T>