Hello I have an array like this
const persons = [{name: 'John'}, {name: 'Rick'}, {name: 'Amy'}]
I would like to separate it with comma and add "and" before the last element
John, Rick and Amy
I can do
persons.map(person => <span>{person.name}, </span>)
but that will generate
John, Rick, Amy,
is there a more efficient (fancy) way of doing this instead of iterating the array and add "," before all elements except the last one?