I have several checkboxes with a name array and I want the output of the checked boxes to be a variable with a comma separated list.
Currently un-tested, but I believe the following should work:
var valuesArray = $('input:checkbox:checked').map( function () {
return $(this).val();
}).get().join();
Edited, after a small break, to use native DOM, rather than $(this).val() (which is needlessly expensive, in context):
var valuesArray = $('input:checkbox:checked').map( function() {
return this.value;
}).get().join(",");