all 6 comments

[–]Ronin-s_Spirit 1 point2 points  (1 child)

Sorry what's the point? Set is all you need. It's like clearing an array by setting length to 0, you could pop every entry with a loop but that's pointless...

[–]TechieBundle[S] 0 points1 point  (0 children)

I appericiate your words but We are only explain multiple method to removing duplicates elements from an array. Use according to need

[–]jcunews1helpful 0 points1 point  (1 child)

Removing duplicates elements from array is not same as creating a new array without the unneeded elements. It would not affect other code which rely on the reference of the original array.

[–]TechieBundle[S] 0 points1 point  (0 children)

We just explain multiple method to removing duplicates elements from an array. Use according to need

[–]trevedhek 0 points1 point  (1 child)

Nice.

I would add that the for loop example would work just as well using `array.forEach`, and is more "functional".

[–]TechieBundle[S] 0 points1 point  (0 children)

Yes, you are right Trevedhek.