Struggling to insert commas between a series of items? Well, fear not!
If you're wondering how, it can be achieved with a simple line of code:
.comma:not(:last-of-type)::after{
content: ", ";
}
<span class="comma">A</span>
<span class="comma">B</span>
<span class="comma">C</span>
However, there's a catch - the commas are not visible text that can be selected. So, if you need them selectable for copying purposes, is there a way to make this happen using CSS or JavaScript?
Let's put our heads together and come up with a solution!