Function join

  • Converts all elements in array into a string separated by separator.

    Parameters

    • array: any[]

      The array to convert.

    • separator: string = ","

      The element separator.

    Returns string

    Returns the joined string.

    Since

    5.0.0

    Example

    join(['a', 'b', 'c'], '~');
    // => 'a~b~c'