delete duplicates from an array

PHOTO EMBED

Thu Oct 06 2022 05:53:45 GMT+0000 (Coordinated Universal Time)

Saved by @davidmchale #javascript #array #duplicate

const numbers = [1, 2, 3, 4, 5, 7, 3, 2, 2, 5];
const updated = [...new Set(numbers)]; // result [1, 2, 3, 4, 5, 7]
content_copyCOPY