Is there a way to prevent adding a comma after the last element, like in the case of ABC1 where a comma should not be added? https://i.sstatic.net/12lNu.png You can find the code sample here >>>Sample
methods:{
test(){
this.Aarray.forEach((value)=>{
this.Codes += value.Code +',';
});
console.log(this.Codes);
}
},
data(){
return{
Codes:'',
Aarray:[
{Code:'ABC12345'},
{Code:'ABC1234'},
{Code:'ABC123'},
{Code:'ABC12'},
{Code:'ABC1'},
]
}
}