|
|
|
Ask HN: Do you prefer tailing or leading comma?
|
|
1 points
by aabbcc1241
547 days ago
|
|
In the js space, people often leave a tailing comma at the end of each line, when writing the elements of an array. I was the practise of using leading comma in Elm, where we put a comma at the beginning of each line, when writing elements of a list. I'm also using leading comma (and leading and/or) when writing sql query. For example: select
user.id
, user.username
from user
where user.ban_time is null
and user.activate_time is not null
|
|