Why is this code generating extra commas?

Posted by user816829 on Stack Overflow See other posts from Stack Overflow or by user816829
Published on 2011-06-27T06:07:21Z Indexed on 2011/06/27 8:22 UTC
Read the original article Hit count: 178

Filed under:

Iam using javascript

function chkout_pp(i) {
    var myarray = new Array();
    var li = 1;
    myarray[0] = ""
    for(j = 1; j < 13; j++)
    {
        if ($('#chkpp'+j).is(':checked') == true) {  
            myarray[li] = $('#chkpp'+j).val()+"<br>";
            li++;
        }
    } 
    $("#ownerarray").val(myarray);
    $("#edmt_pp").html(myarray+"");
}

this is javascript in this it is generating comma i want to remove comma from that,is their anyone can as\nswer my question

© Stack Overflow or respective owner

Related posts about JavaScript