join
arrayConverts all elements in array into a string separated by separator.
Signature
join(array: any[], separator?: string): stringParameters
| Name | Type | Description |
|---|---|---|
array | any[] | The array to convert |
separator? | string | The element separatorDefault: , |
Returns
string - Returns the joined string
Examples
Custom separator
import { join } from 'dashlite'
const result = join(['a', 'b', 'c'], '~')
console.log(result)Output:
'a~b~c'Available since version 1.0.0