join - nodef/extra-lists GitHub Wiki

Join lists together into a string.

function join(x, sep, asc)
// x:   lists
// sep: separator [,]
// asc: associator [=]
const xlists = require('extra-lists');

var x = ['a', 'b', 'c'], [1, 2, 3](/nodef/extra-lists/wiki/'a',-'b',-'c'],-[1,-2,-3);
xlists.join(x);
// → 'a=1,b=2,c=3'

xlists.join(x, ', ', ' => ');
// → 'a => 1, b => 2, c => 3'

References