7 ms·
This is why you prepend the comma before every succeeding item in a list or map.
by codehero 13y ago
This is why you prepend the comma before every succeeding item in a list or map.
- swift 13y agoThis is what I do, but it basically just has the effect of making the first item special instead of the last. That's usually better in practice, though.
- peferron 13y agoThis seems to only move the problem to the first item instead of the last one, not solve it.
- Pxtl 13y agoYou've slightly improved the problem by moving it away from the last item on the list, but you've now screwed up the first item. You can no longer insert a first-item using the same format, and instead of a trailing comma bug you can get a starting comma bug.