Skip to main content

CommonArraysEqual

Callable

  • CommonArraysEqual<T>(a1, a2, ignoreOrder): a2 is T

  • Checks whether two arrays are equal. The arrays are considered equal if they have the same length and contain the same items in the same order, as determined by === comparison


    Parameters

    • a1: T

      The first array to compare

    • a2: readonly any[]

      The second array to compare

    • optionalignoreOrder: boolean = false

      Whether to ignore item order when considering equality

    Returns a2 is T

    • TRUE if both arrays have the same length and contain the same items in the same order, FALSE otherwise