• Removes an item from an array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      the array that may contain the item to remove

    • item: T

      the item to remove from the array

    Returns T | null

    the removed item or null if it wasn't part of the array