• Removes the first occurrence of a specified value from an array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array from which to remove the value.

    • value: T

      The value to remove.

    Returns number

    • The index of the removed value, or -1 if the value was not found.