['tom', 'dick', 'harry'].join(', ').replace(/, ([^,]*)$/, ' and $1') > "tom, dick and harry"
var a = ['a', 'b', 'c']; var str = a.slice(0, -1).join(',')+' or '+a.slice(-1);