Array.join
Array.join
Function
Concatenate array elements into a string according to delimiters.
Syntax
array.join(separator)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| separator | Any | No | "," | The separator between elements, which will be converted to a string first when called. |
Return value
| Type | Description |
|---|---|
| String | Returns the concatenated string. |
Example
items = ['BT', 'Lang'] result = items.join('-') // Output: BT-Lang print result
Notes
- Each element will be converted to text according to BT stringification rules.