User:CodeCat/lookup language

Fragment of a discussion from User talk:Rua
Jump to navigation Jump to search

What would I use instead of the comma then?

CodeCat18:53, 24 August 2014

Nothing? Comma is a separator, not a terminator.

Keφr19:49, 24 August 2014

Oh I see now. Some languages allow a comma at the end of the list, I know both Python and Lua do. Since I prefer to place the actual terminator of the list on the next line by itself, putting a comma after the last element looks a bit more consistent. It's more a matter of code style than it really being useful for anything. If not all browsers support it I won't do it for JS.

CodeCat19:54, 24 August 2014