Function isArrayIndex

  • Returns whether a value is a valid ECMAScript array index.

    The maximum array index is 2^32 - 2; 2^32 - 1 is reserved and does not update an array's length.

    Parameters

    • value: unknown

      Candidate numeric property key.

    Returns value is number

    Whether value is an integer in the ECMAScript array-index range.