9 lines
260 B
CoffeeScript
9 lines
260 B
CoffeeScript
quibble = ([most..., last]) ->
|
|
'{' +
|
|
(most.join ', ') +
|
|
(if most.length then ' and ' else '') +
|
|
(last or '') +
|
|
'}'
|
|
|
|
console.log quibble(s) for s in [ [], ["ABC"], ["ABC", "DEF"],
|
|
["ABC", "DEF", "G", "H" ] ]
|