I have this array where i add values on click, but i want to check if value is already in array, if it is do nothing. I tried with indexOf but i get same result every time
this.fields.push(this.field);
this.field = { value: '' };
I have this array where i add values on click, but i want to check if value is already in array, if it is do nothing. I tried with indexOf but i get same result every time
|
||||
|
Are you determining if it's in the array by the
|
|||
|