Remove the last comma in an inline list of tags?
There's a couple of special variables available while for looping through an array. In your case I'd make use of loop.last.

{{ tag }}{{ not loop.last ? ', ' }}


This is the expression using the ternary operator to keep the syntax short.