0 points

Prevent duplicate values to be added to an array.


dashboard

Fri Nov 13 2020 04:55:07 GMT+0000 (UTC)

Posted by @mvieira #javascript

if (array.includes(value) === false) array.push(value);
content_copy Copy

https://stackoverflow.com/questions/46700862/trying-to-prevent-duplicate-values-to-be-added-to-an-array/46700870