• Adds an item to the end of an array, or returns a new array if list is null or undefined.

    Same as [...list, x].

    Type Parameters

    • T

    Parameters

    • x: T

    Returns (<U>(list) => (T | U)[])

      • <U>(list): (T | U)[]
      • Type Parameters

        • U

        Parameters

        • list: U[]

        Returns (T | U)[]

    Example

    append(12)([3, 6, 9])
    // => [3, 6, 9, 12]

    append(12)(undefined)
    // => [12]

Generated using TypeDoc