array set javascript - Αναζήτηση Google

PHOTO EMBED

Sat Feb 20 2021 08:40:10 GMT+0000 (Coordinated Universal Time)

Saved by @Agtheo09 #javascript

const myArray = [1,2,3,1,5,8,1,2,9,4];
const unique = [...new Set(myArray)]; // [1, 2, 3, 5, 8, 9, 4]

const myString = ["a","b","c","a","d","b"];
const uniqueString = [...new Set(myString)]; //["a", "b", "c", "d"]
content_copyCOPY

https://www.google.com/search?sxsrf