Actually i want to do .prevent adding duplicate values to a array.
I’m using this below code.
for(let i =0;i<this.mydata.length;i++){
if(this.brandName.indexOf(this.brandName) == -1) {
this.brandName.push(this.mydata[i]);
}
}
please help anyone