Convert javascript array to string

前端 未结 14 906
逝去的感伤
逝去的感伤 2020-11-29 16:41

I\'m trying to iterate over a \"value\" list and convert it into a string. Here is the code:

var blkstr = $.each(value, function(idx2,val2) {                        


        
14条回答
  •  既然无缘
    2020-11-29 17:26

    not sure if this is what you wanted but

    var arr = [A, B, C];
    var arrString = arr.join(", ");
    

    This results in the following output:

    A, B, C

提交回复
热议问题