Remove array delimiters

前端 未结 5 1406
终归单人心
终归单人心 2021-01-18 23:51

Is it possible remove delimiters when you array.toString? (javascript)

var myArray = [ \'zero\', \'one\', \'two\', \'three\', \'four\', \'five\' ];
var resul         


        
5条回答
  •  一整个雨季
    2021-01-18 23:58

    Normally the separator is , to remove the separetor use the function .replace(/,/g,'')

    But if there is comma , in the data you might want to consider something like

    var str = '';
    for(var x=0; x

提交回复
热议问题