我有一个字符串数组
["Ann", "David", "Ben"]
如何在javascript中转换为CSV字符串?
"Ann, David, Ben"
答案 0 :(得分:0)
join()
将为您完成。参见:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
a=["Ann", "David", "Ben"]
a.join()
"Ann,David,Ben"