Skip to main content
Float16ArrayConstructor.from - Platform - Web documentation
method Float16ArrayConstructor.from
Private
Float16ArrayConstructor.from(arrayLike: ArrayLike<number>): Float16Array

Creates an array from an array-like or iterable object.

Parameters

arrayLike: ArrayLike<number>

An array-like or iterable object to convert to an array.

Return Type

Float16ArrayConstructor.from<T>(
arrayLike: ArrayLike<T>,
mapfn: (
v: T,
k: number,
) => number
,
thisArg?: any,
): Float16Array

Creates an array from an array-like or iterable object.

Type Parameters

T

Parameters

arrayLike: ArrayLike<T>

An array-like or iterable object to convert to an array.

mapfn: (
v: T,
k: number,
) => number

A mapping function to call on every element of the array.

optional
thisArg: any

Value of 'this' used to invoke the mapfn.

Return Type