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.
var valuesArray = $('input[name="valuehere"]:checked').map(function () { return this.value; }).get().join(",");
works for me always