vue遍历数组存放至字符串 , 分隔

let applicationIdArr = ["张三","李四","王五","赵六"];
let applicationids = "";
applicationIdArr.filter((item,i)=>{
   if(i==applicationIdArr.length-1)
   {
       applicationids+=item;
   }
   else
   {
       applicationids+=item+",";
   }                    
})
// console.log(applicationids);

 

posted @ 2020-09-09 16:41  一介桃白白  阅读(1306)  评论(0编辑  收藏  举报