v2.vuejs.org
v2.vuejs.org copied to clipboard
Preventing array from storing duplicate values
On the todo app, How do I prevent an array from duplicating the etext i have just inserted
@sosmongare you can just find the index of that value first using find or indexOf before updating the array
['m', 'I', 'j'].find(data => data === value)