神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface Uint16Array<TArrayBuffer>

    A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.

    interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
        "[toStringTag]": "Uint16Array";
        buffer: TArrayBuffer;
        byteLength: number;
        byteOffset: number;
        BYTES_PER_ELEMENT: number;
        length: number;
        "[iterator]"(): IterableIterator<number>;
        "[iterator]"(): IterableIterator<number>;
        copyWithin(target: number, start: number, end?: number): this;
        copyWithin(target: number, start: number, end?: number): this;
        entries(): ArrayIterator<[number, number]>;
        entries(): IterableIterator<[number, number]>;
        entries(): IterableIterator<[number, number]>;
        every(
            predicate: (value: number, index: number, array: this) => unknown,
            thisArg?: any,
        ): boolean;
        every(
            callbackfn: (
                value: number,
                index: number,
                array: Uint16Array,
            ) => unknown,
            thisArg?: any,
        ): boolean;
        fill(value: number, start?: number, end?: number): this;
        fill(value: number, start?: number, end?: number): this;
        filter(
            predicate: (value: number, index: number, array: this) => any,
            thisArg?: any,
        ): Uint16Array<ArrayBuffer>;
        filter(
            callbackfn: (value: number, index: number, array: Uint16Array) => any,
            thisArg?: any,
        ): Uint16Array;
        find(
            predicate: (value: number, index: number, obj: this) => boolean,
            thisArg?: any,
        ): number;
        find(
            predicate: (value: number, index: number, obj: Uint16Array) => boolean,
            thisArg?: any,
        ): number;
        findIndex(
            predicate: (value: number, index: number, obj: this) => boolean,
            thisArg?: any,
        ): number;
        findIndex(
            predicate: (value: number, index: number, obj: Uint16Array) => boolean,
            thisArg?: any,
        ): number;
        forEach(
            callbackfn: (value: number, index: number, array: this) => void,
            thisArg?: any,
        ): void;
        forEach(
            callbackfn: (value: number, index: number, array: Uint16Array) => void,
            thisArg?: any,
        ): void;
        includes(searchElement: number, fromIndex?: number): boolean;
        includes(searchElement: number, fromIndex?: number): boolean;
        indexOf(searchElement: number, fromIndex?: number): number;
        indexOf(searchElement: number, fromIndex?: number): number;
        join(separator?: string): string;
        join(separator?: string): string;
        keys(): ArrayIterator<number>;
        keys(): IterableIterator<number>;
        keys(): IterableIterator<number>;
        lastIndexOf(searchElement: number, fromIndex?: number): number;
        lastIndexOf(searchElement: number, fromIndex?: number): number;
        map(
            callbackfn: (value: number, index: number, array: this) => number,
            thisArg?: any,
        ): Uint16Array<ArrayBuffer>;
        map(
            callbackfn: (
                value: number,
                index: number,
                array: Uint16Array,
            ) => number,
            thisArg?: any,
        ): Uint16Array;
        reduce(
            callbackfn: (
                previousValue: number,
                currentValue: number,
                currentIndex: number,
                array: this,
            ) => number,
        ): number;
        reduce<U>(
            callbackfn: (
                previousValue: U,
                currentValue: number,
                currentIndex: number,
                array: this,
            ) => U,
            initialValue: U,
        ): U;
        reduce(
            callbackfn: (
                previousValue: number,
                currentValue: number,
                currentIndex: number,
                array: Uint16Array,
            ) => number,
        ): number;
        reduceRight(
            callbackfn: (
                previousValue: number,
                currentValue: number,
                currentIndex: number,
                array: this,
            ) => number,
        ): number;
        reduceRight<U>(
            callbackfn: (
                previousValue: U,
                currentValue: number,
                currentIndex: number,
                array: this,
            ) => U,
            initialValue: U,
        ): U;
        reduceRight(
            callbackfn: (
                previousValue: number,
                currentValue: number,
                currentIndex: number,
                array: Uint16Array,
            ) => number,
        ): number;
        reverse(): this;
        reverse(): Uint16Array;
        set(array: ArrayLike<number>, offset?: number): void;
        set(array: ArrayLike<number>, offset?: number): void;
        slice(start?: number, end?: number): Uint16Array<ArrayBuffer>;
        slice(start?: number, end?: number): Uint16Array;
        some(
            predicate: (value: number, index: number, array: this) => unknown,
            thisArg?: any,
        ): boolean;
        some(
            callbackfn: (
                value: number,
                index: number,
                array: Uint16Array,
            ) => unknown,
            thisArg?: any,
        ): boolean;
        sort(compareFn?: (a: number, b: number) => number): this;
        sort(compareFn?: (a: number, b: number) => number): this;
        subarray(begin?: number, end?: number): Uint16Array<TArrayBuffer>;
        subarray(begin?: number, end?: number): Uint16Array;
        toLocaleString(): string;
        toLocaleString(): string;
        toString(): string;
        toString(): string;
        valueOf(): this;
        valueOf(): Uint16Array;
        values(): ArrayIterator<number>;
        values(): IterableIterator<number>;
        values(): IterableIterator<number>;
    }

    Type Parameters

    • TArrayBuffer extends ArrayBufferLike = ArrayBufferLike
    Index

    Properties

    "[toStringTag]": "Uint16Array"

    一个字符串值,用于创建对象的默认字符串描述。由内置方法 Object.prototype.toString 调用。

    A String value that is used in the creation of the default string description of an object. Called by the built-in method Object.prototype.toString.

    buffer: TArrayBuffer

    The ArrayBuffer instance referenced by the array.

    byteLength: number

    The length in bytes of the array.

    byteOffset: number

    The offset in bytes of the array.

    BYTES_PER_ELEMENT: number

    The size in bytes of each element in the array.

    length: number

    The length of the array.

    Methods

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

      Parameters

      • target: number

        If target is negative, it is treated as length+target where length is the length of the array.

      • start: number

        If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

      • Optionalend: number

        If not specified, length of the this object is used as its default value.

      Returns this

    • Parameters

      • target: number
      • start: number
      • Optionalend: number

      Returns this

      将数组中由 start 和 end 标识的部分复制到同一数组中从 target 位置开始的位置后,返回 this 对象。

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

      如果 target 为负数,则视为 length+target,其中 length 是数组的长度。

      If target is negative, it is treated as length+target where length is the length of the array.

      如果 start 为负数,则视为 length+start。

      If start is negative, it is treated as length+start.

      如果 end 为负数,则视为 length+end。如果未指定,则使用 this 对象的长度作为其默认值。

      If end is negative, it is treated as length+end. If not specified, length of the this object is used as its default value.

    • Returns an array of key, value pairs for every entry in the array

      Returns ArrayIterator<[number, number]>

    • Returns IterableIterator<[number, number]>

      返回一个数组,其中包含数组中每个条目的键/值对。

      Returns an array of key, value pairs for every entry in the array

    • Returns IterableIterator<[number, number]>

      返回一个迭代器,该迭代器包含数组中每个索引的键/值对。

      Returns an iterator that contains the key/value pairs for each index in the array.

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

      Parameters

      • predicate: (value: number, index: number, array: this) => unknown

        A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

      Returns boolean

    • Parameters

      • callbackfn: (value: number, index: number, array: Uint16Array) => unknown
      • OptionalthisArg: any

      Returns boolean

      确定数组的所有成员是否满足指定的测试。

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

      一个接受最多三个参数的函数。every 方法为数组中的每个元素调用 callbackfn 函数,直到 callbackfn 返回一个可强制转换为布尔值 false 的值,或者直到数组的末尾。

      A function that accepts up to three arguments. The every method calls the callbackfn function for each element in the array until the callbackfn returns a value which is coercible to the Boolean value false, or until the end of the array.

      在 callbackfn 函数中 this 关键字可以引用的对象。如果省略 thisArg,则使用 undefined 作为 this 值。

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

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

      Parameters

      • value: number

        value to fill array section with

      • Optionalstart: number

        index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

      • Optionalend: number

        index to stop filling the array at. If end is negative, it is treated as length+end.

      Returns this

    • Parameters

      • value: number
      • Optionalstart: number
      • Optionalend: number

      Returns this

      在用 value 填充由 start 和 end 标识的部分后返回 this 对象。

      Returns the this object after filling the section identified by start and end with value.

      用来填充数组部分的值。

      value to fill array section with.

      开始填充数组的索引。如果 start 为负数,则视为 length+start,其中 length 是数组的长度。

      index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

      停止填充数组的索引。如果 end 为负数,则视为 length+end。

      index to stop filling the array at. If end is negative, it is treated as length+end.

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

      Parameters

      • predicate: (value: number, index: number, array: this) => any

        A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

      Returns Uint16Array<ArrayBuffer>

    • Parameters

      • callbackfn: (value: number, index: number, array: Uint16Array) => any
      • OptionalthisArg: any

      Returns Uint16Array

      返回数组中满足回调函数中指定条件的元素。

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

      一个接受最多三个参数的函数。filter 方法为数组中的每个元素调用一次 callbackfn 函数。

      A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

      在 callbackfn 函数中 this 关键字可以引用的对象。如果省略 thisArg,则使用 undefined 作为 this 值。

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

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

      Parameters

      • predicate: (value: number, index: number, obj: this) => boolean

        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns number

    • Parameters

      • predicate: (value: number, index: number, obj: Uint16Array) => boolean
      • OptionalthisArg: any

      Returns number

      返回数组中第一个谓词为 true 的元素的值,否则返回 undefined。

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

      find 为数组的每个元素(按升序)调用一次谓词,直到找到一个谓词返回 true 的元素。如果找到这样的元素,find 会立即返回该元素的值。否则,find 返回 undefined。

      find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

      如果提供,它将用作每次调用谓词的 this 值。如果未提供,则使用 undefined。

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

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

      Parameters

      • predicate: (value: number, index: number, obj: this) => boolean

        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns number

    • Parameters

      • predicate: (value: number, index: number, obj: Uint16Array) => boolean
      • OptionalthisArg: any

      Returns number

      返回数组中第一个谓词为 true 的元素的索引,否则返回 -1。

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

      findIndex 为数组的每个元素(按升序)调用一次谓词,直到找到一个谓词返回 true 的元素。如果找到这样的元素,findIndex 会立即返回该元素的索引。否则,findIndex 返回 -1。

      findIndex calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

      如果提供,它将用作每次调用谓词的 this 值。如果未提供,则使用 undefined。

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

    • Performs the specified action for each element in an array.

      Parameters

      • callbackfn: (value: number, index: number, array: this) => void

        A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

      Returns void

    • Parameters

      • callbackfn: (value: number, index: number, array: Uint16Array) => void
      • OptionalthisArg: any

      Returns void

      对数组中的每个元素执行指定的操作。

      Performs the specified action for each element in an array.

      一个接受最多三个参数的函数。forEach 为数组中的每个元素调用一次 callbackfn 函数。

      A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

      在 callbackfn 函数中 this 关键字可以引用的对象。如果省略 thisArg,则使用 undefined 作为 this 值。

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

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

      Parameters

      • searchElement: number

        The element to search for.

      • OptionalfromIndex: number

        The position in this array at which to begin searching for searchElement.

      Returns boolean

    • Parameters

      • searchElement: number
      • OptionalfromIndex: number

      Returns boolean

      判断一个数组是否包含一个指定的值,根据情况返回 true 或 false。

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

      需要查找的元素值。

      The element to search for.

      从该索引处开始查找 searchElement。如果为负值,则按升序从 array.length + fromIndex 的索引开始搜索。

      The position in this array at which to begin searching for searchElement.

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

      Parameters

      • searchElement: number

        The value to locate in the array.

      • OptionalfromIndex: number

        The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

      Returns number

    • Parameters

      • searchElement: number
      • OptionalfromIndex: number

      Returns number

      返回一个值在数组中第一次出现的索引。

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

      要在数组中定位的值。

      The value to locate in the array.

      开始搜索的数组索引。如果省略 fromIndex,则从索引 0 开始搜索。

      The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

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

      Parameters

      • Optionalseparator: string

        A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

      Returns string

    • Parameters

      • Optionalseparator: string

      Returns string

      将数组的所有元素用指定的分隔符字符串连接起来。

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

      用于在生成的字符串中分隔数组的一个元素的字符串。如果省略,数组元素用逗号分隔。

      A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

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

      Parameters

      • searchElement: number

        The value to locate in the array.

      • OptionalfromIndex: number

        The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

      Returns number

    • Parameters

      • searchElement: number
      • OptionalfromIndex: number

      Returns number

      返回一个值在数组中最后一次出现的索引。

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

      要在数组中定位的值。

      The value to locate in the array.

      开始搜索的数组索引。如果省略 fromIndex,则从数组的最后一个元素开始向前搜索。

      The array index at which to begin the search. If fromIndex is omitted, the search starts at the last element and goes backwards.

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

      Parameters

      • callbackfn: (value: number, index: number, array: this) => number

        A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

      Returns Uint16Array<ArrayBuffer>

    • Parameters

      • callbackfn: (value: number, index: number, array: Uint16Array) => number
      • OptionalthisArg: any

      Returns Uint16Array

      对数组中的每个元素调用定义的回调函数,并返回包含结果的新数组。

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

      一个接受最多三个参数的函数。map 方法为数组中的每个元素调用一次 callbackfn 函数。

      A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

      在 callbackfn 函数中 this 关键字可以引用的对象。如果省略 thisArg,则使用 undefined 作为 this 值。

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    • Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      Parameters

      • callbackfn: (
            previousValue: number,
            currentValue: number,
            currentIndex: number,
            array: this,
        ) => number

        A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

      Returns number

    • Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      Type Parameters

      • U

      Parameters

      • callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U

        A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

      • initialValue: U

        If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

      Returns U

    • Parameters

      • callbackfn: (
            previousValue: number,
            currentValue: number,
            currentIndex: number,
            array: Uint16Array,
        ) => number

      Returns number

      为数组中的所有元素调用指定的回调函数。回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。

      Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      一个接受最多四个参数的函数。reduce 方法为数组中的每个元素调用一次 callbackfn 函数。

      A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

      如果指定了 initialValue,它将用作开始累积的初始值。第一次调用 callbackfn 函数时,将此值作为参数而不是数组值。

      If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

    • Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      Parameters

      • callbackfn: (
            previousValue: number,
            currentValue: number,
            currentIndex: number,
            array: this,
        ) => number

        A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

      Returns number

    • Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      Type Parameters

      • U

      Parameters

      • callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U

        A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

      • initialValue: U

        If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

      Returns U

    • Parameters

      • callbackfn: (
            previousValue: number,
            currentValue: number,
            currentIndex: number,
            array: Uint16Array,
        ) => number

      Returns number

      按降序为数组中的所有元素调用指定的回调函数。回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。

      Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      一个接受最多四个参数的函数。reduceRight 方法为数组中的每个元素调用一次 callbackfn 函数。

      A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

      如果指定了 initialValue,它将用作开始累积的初始值。第一次调用 callbackfn 函数时,将此值作为参数而不是数组值。

      If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

    • Reverses the elements in an Array.

      Returns this

    • Returns Uint16Array

      反转数组中的元素。

      Reverses the elements in an Array.

    • Sets a value or an array of values.

      Parameters

      • array: ArrayLike<number>

        A typed or untyped array of values to set.

      • Optionaloffset: number

        The index in the current array at which the values are to be written.

      Returns void

    • Parameters

      • array: ArrayLike<number>
      • Optionaloffset: number

      Returns void

      设置一个值或一个数组的值。

      Sets a value or an array of values.

      要设置的值的类型化或非类型化数组。

      A typed or untyped array of values to set.

      要写入值的当前数组中的索引。

      The index in the current array at which the values are to be written.

    • Returns a section of an array.

      Parameters

      • Optionalstart: number

        The beginning of the specified portion of the array.

      • Optionalend: number

        The end of the specified portion of the array. This is exclusive of the element at the index 'end'.

      Returns Uint16Array<ArrayBuffer>

    • Parameters

      • Optionalstart: number
      • Optionalend: number

      Returns Uint16Array

      返回数组的一部分。

      Returns a section of an array.

      指定部分的开始。

      The beginning of the specified portion of the array.

      指定部分的结束。这是不包括索引 'end' 处的元素。

      The end of the specified portion of the array. This is exclusive of the element at the index 'end'.

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

      Parameters

      • predicate: (value: number, index: number, array: this) => unknown

        A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

      Returns boolean

    • Parameters

      • callbackfn: (value: number, index: number, array: Uint16Array) => unknown
      • OptionalthisArg: any

      Returns boolean

      确定指定的回调函数是否对数组的任何元素返回 true。

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

      一个接受最多三个参数的函数。some 方法为数组中的每个元素调用 callbackfn 函数,直到 callbackfn 返回一个可强制转换为布尔值 true 的值,或者直到数组的末尾。

      A function that accepts up to three arguments. The some method calls the callbackfn function for each element in the array until the callbackfn returns a value which is coercible to the Boolean value true, or until the end of the array.

      在 callbackfn 函数中 this 关键字可以引用的对象。如果省略 thisArg,则使用 undefined 作为 this 值。

      An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

    • Sorts an array.

      Parameters

      • OptionalcompareFn: (a: number, b: number) => number

        Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they're equal and a positive value otherwise. If omitted, the elements are sorted in ascending order.

        [11,2,22,1].sort((a, b) => a - b)
        

      Returns this

    • Parameters

      • OptionalcompareFn: (a: number, b: number) => number

      Returns this

      对数组进行排序。

      Sorts an array.

      用于确定元素顺序的函数。如果第一个参数小于第二个参数,则应返回负值;如果相等,则返回零;否则返回正值。如果省略,则元素按升序 ASCII 字符顺序排序。

      Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they're equal and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.

      [11,2,22,1].sort((a, b) => a - b)
      
    • Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

      Parameters

      • Optionalbegin: number

        The index of the beginning of the array.

      • Optionalend: number

        The index of the end of the array.

      Returns Uint16Array<TArrayBuffer>

    • Parameters

      • Optionalbegin: number
      • Optionalend: number

      Returns Uint16Array

      获取此数组的 ArrayBuffer 存储的新 Uint16Array 视图,引用从 begin(包含)到 end(不包含)的元素。

      Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

      数组的起始索引。

      The index of the beginning of the array.

      数组的结束索引。

      The index of the end of the array.

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

      Returns string

    • Returns string

      使用当前区域设置将数字转换为字符串。

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

    • Returns a string representation of an array.

      Returns string

    • Returns string

      返回数组的字符串表示形式。

      Returns a string representation of an array.

    • Returns the primitive value of the specified object.

      Returns this

    • Returns Uint16Array

      返回此对象的原始值。

      Returns the primitive value of this object.