incatenate string в javaScript и в последнюю запятую

['tom', 'dick', 'harry'].join(', ').replace(/, ([^,]*)$/, ' and $1')
> "tom, dick and harry"
Enchanting Eagle