📅  最后修改于: 2022-03-11 14:48:37.401000             🧑  作者: Mango
var authors = [{
name: "a"
}, {
name: "b"
}, {
name: "c"
}];
var result = authors.reduce(function(author, val, index) {
var comma = author.length ? ", " : "";
return author + comma + val.name;
}, '');
console.log(result);