I want to add a comma to every item except the last one. The last one must have “and”.
Item 1, Item 2 and Item 3
But items can be from 1 +
So if one item:
Item 1
If two items:
Item 1 and Item 2
If three items:
Item 1, Item 2 and Item 3
If four items:
Item 1, Item 2, Item 3 and Item 4
etc, etc.
Here’s a function for that; just pass the array.
Demo