join
Join a List's elements into a string.
list.join(separator)
join
turns a List into a string by inserting separator between the string representations
of all the elements of the List.
Parameters
- separator
{String}
:the string to seperate elements with
Returns
{String}
:
the joined string
var list = new List(['Alice', 'Bob', 'Eve']);
list.join(', '); // 'Alice, Bob, Eve'
var beatles = new List(['John', 'Paul', 'Ringo', 'George']);
beatles.join('&'); // 'John&Paul&Ringo&George'