• function

join can.Observe.List.prototype.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

  1. separator {String}

    the string to seperate elements with

Returns

{String}

the joined string

var list = new can.Observe.List(['Alice', 'Bob', 'Eve']);
list.join(', '); // 'Alice, Bob, Eve'

var beatles = new can.Observe.List(['John', 'Paul', 'Ringo', 'George']);
beatles.join('&'); // 'John&Paul&Ringo&George'