join

string

Joins array elements into a string with a separator

Syntax

join(array, separator)

Parameters

array (array)

The array of elements to join

separator (string)

The delimiter to place between elements

Returns

string

String with joined array elements

Examples

Input:
join(["a", "b", "c"], ",")
Output:
"a,b,c"
Input:
join(["hello", "world"], " ")
Output:
"hello world"
Input:
["x", "y", "z"] | join("-")
Output:
"x-y-z"

The join() function combines array elements into a single string using a specified separator. This is the inverse operation of split().

Usage

Use join() when you need to combine array elements into a delimited string, such as creating CSV output or formatting lists for display.

Related Functions