• Returns the array that adds all 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 adds all the given elements

    addAll(undefined, ['bar']);    // ['bar']
    addAll(['foo', 'bar'], undefined); // ['foo', 'bar']
    addAll(['foo', 'bar'], ['world']); // ['foo', 'bar', 'world']