Reduce array to a single string
<p>I would like to use the <code>reduce</code> function instead of doing this:</p>

<pre><code>var result = '';
authors.forEach(
    function(author) {
        result += author.name + ', ';
    }
);
console.log(result);
</code></pre>

<p>So in the array <code>authors</code> there are several names. Now I want to build a string with this names, separated by comma (except the last one).</p>

<pre><code>var result = authors.reduce(function (author, index) {
    return author + ' ';
}, '');
console.log(result);
</code></pre>