• Returns the array that removes the given elements

    Type Parameters

    • E

    Parameters

    • Optionalarray: null | E[]

      the arrays to inspect

    • Optionalelements: null | E[]

      the elements to remove

    Returns E[] | undefined | null

    the array that removes the given elements

    removeAll(undefined, ['bar']);    // undefined
    removeAll(['foo', 'bar'], undefined); // ['foo', 'bar']
    removeAll(['foo', 'bar'], ['bar']); // ['foo']