2 ms·
If you'd like trailing commas in your JavaScript, one of the tiny things that CoffeeScript does is allow trailing commas, or for commas to be omitted altogether
by jashkenas 17y ago
If you'd like trailing commas in your JavaScript, one of the tiny things that CoffeeScript does is allow trailing commas, or for commas to be omitted altogether on multi-line array and object literals.
list: [
"ape",
"bat",
]
list: [
"ape"
"bat"
]
.. are the same.
- arohner 17y agoAnd in Clojure, all commas everywhere are whitespace. You can use them, or not use them, even on single line expressions. (list a b c) == (list a, b, c) == (list a b, c)