0
How to remove duplicate elements in an array in Javascript?
I don't think I learned it.
5 Respuestas
+ 3
Use a for loop to loop through the array and push each item to another new array on one condition, the condition is that it must not be already present in the new array.
Tip: You can check that if a value exists in an array using arr.includes(value)
+ 3
arr = [...new Set(arr)];
+ 2
Med Amine Fh You should know how to do it manually before using the advance ways.
+ 1
use visph way its more easier
+ 1
Agree maf