Functions to join strings
Methods
(static) join(strings, sepopt) → {string}
Joins an array of strings with optional separator
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
strings |
Array.<string> | An array of strings |
||
sep |
string |
<optional> |
"" | Separator to insert between strings |
- Since:
- 0.0.1
Returns:
- Type
- string
Example
join(["h", "e", "l", "l", "o"])
// => "hello"
join(["😁", "🐶", "🍕"], "-")
// => "😁-🐶-🍕"