What I want is something like Array.join(separator), but which takes a second argument Array.join(separator, beforeLastElement), so when I say [f
Array.join(separator)
Array.join(separator, beforeLastElement)
[f
May I suggest:
['tom', 'dick', 'harry'].join(', ').replace(/, ([^,]*)$/, ' and $1') > "tom, dick and harry"