I’m trying to create a comma-separated list. I want to make sure that the last line won’t have a comma at the end.
This is what I have so far without any commas just the data:
var labelText = $(this).attr("placeholder");
$('div.errors').append(''+labelText+' Required');
Not sure if I should use the map() function for this or do some sort of if statement?
You can use Array.join()