Q:

Storing values of second 's as comma separated just before deletion

I have a table having 2 <td>'s one is having a checkbox and other having a value:
My table as follows:
<table border="1" id="table_sundry">
    <tr>
        <td><input type="checkbox" id="chk_1"></td>
             <td id="val1">a</td>
    </tr>
        <tr>
        <td><input type="checkbox" id="chk_2"></td>
             <td id="val2">b</td>
    </tr>
            <tr>
        <td><input type="checkbox" id="chk_3"></td>
             <td id="val3">c</td>
    </tr>
                  <tr>
        <td><input type="checkbox" id="chk_4"></td>
             <td id="val4">d</td>
    </tr>
                        <tr>
        <td><input type="checkbox" id="chk_5"></td>
             <td id="val3">e</td>
    </tr>
</table>
                      <input type="button" id="btn_del" value="deleterow">

I have a button to delete the rows after checking that particular row.
In delete What I doing is as follows:
$("#btn_del").click(function(){ 
   var checked = $("#table_sundry tr input:checked").size();
    var total = $("#table_sundry tr").size()-1; 
    var rowcnt =  document.getElementById("table_sundry").rows.length-1;  

    var flag = 0;
    if($("#chk_"+rowcnt).prop('checked') == true){ //if delete contains last row
        $("#table_sundry tr input:checked").parents('tr').remove();

         flag =1;
        //updateRowCount(flag);
    }
    else{ 
            $("#table_sundry tr input:checked").parents('tr').remove();
            //updateRowCount(flag);
        }
});

I need to store the values of second column as comma separated. 
Suppose if I delete first and last column I should get a,e in the variable.
Refer fiddle : FIDDLE

A:

JS Fiddle: https://jsfiddle.net/7ft6qtja/2/
HTML
<table border="1" id="table_sundry">
    <tr>
        <td><input type="checkbox" id="chk_1"></td>
             <td id="val1">a</td>
    </tr>
        <tr>
        <td><input type="checkbox" id="chk_2"></td>
             <td id="val2">b</td>
    </tr>
            <tr>
        <td><input type="checkbox" id="chk_3"></td>
             <td id="val3">c</td>
    </tr>
                  <tr>
        <td><input type="checkbox" id="chk_4"></td>
             <td id="val4">d</td>
    </tr>
                        <tr>
        <td><input type="checkbox" id="chk_5"></td>
             <td id="val3">e</td>
    </tr>
</table>
                      <input type="button" id="btn_del" value="deleterow">

JavaScript
var values = [];
var csv = ""; // Store Comma separated values in this variable;

$(document).ready(function(){

  $("#btn_del").click(function(){ 

    var checkboxes = $("#table_sundry tr input:checked");

    if (checkboxes.length > 0) { 

      $.each(checkboxes, function (index, checkbox) {

        var tr = $(checkbox).closest("tr");

        var value = tr.find("td:eq(1)").html();

        values.push(value);

        csv = values.join();

        tr.remove();

      });

      alert(csv);

    }
    else {

      alert("Please select an item.");

    }

  });

});    

