how to concatenate an array of strings reduce code example
Example 1: js reduce a array of straing
var authors = [{name: 'some author'},{name: 'another author'},{name: 'last author'}]
var authorString = authors.map(function(author){
return author.name;
}).join(",");
console.log(authorString);
Example 2: js reduce a array of straing
var authors = ['some author', 'another author', 'last author'];
var authorString = authors.join(",");
console.log(authorString);