• Find an element within the Array and remove it from the array

    Parameters

    • find: Function

      A function to use as input to findIndex

    • Optional replace: any

      A replacement for the spliced element

    Returns any

    The replacement element, the removed element, or null if no element was found.