mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
348 B
348 B
date | id | title |
---|---|---|
2020-10-12 | ee9a4791-e3e8-4437-98fa-6c2d34be1a8e | JavaScript Sets |
Introduction
A Set is a collection of unique elements.
Example
const arr = [5, 1, 5, 7, 7, 5];
const unique = [...new Set(arr)]; // [ 5, 1, 7 ]