+ 1

How can i remove duplicated element in array

Let's say that i hsve this array [1,2,5,2,4,1,2] How can i remove the duplicated elements to have like this array: [1,2,4,5]

13th Apr 2019, 9:44 AM
Bachir
Bachir - avatar
2 Antworten
+ 6
https://www.sololearn.com/learn/JavaScript/2980/?ref=app Use set. Then, loop the set to display the elements
13th Apr 2019, 9:48 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar