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.
jQuery how to get multiple checkbox's value and output as comma separated String list.
https://www.tutsmake.com/jquery-multiple-checkbox-values-to-comma-separated-string/
$(document).ready(function() {
$(".btn_click").click(function(){
var programming = $("input[name='programming']:checked").map(function() {
return this.value;
}).get().join(', ');
alert("My favourite programming languages are: " + programming);
});
});
jQuery Get Values of Selected Checboxes