Created
July 5, 2022 19:55
-
-
Save faustoct1/fafc808a89021aa4625276e6e2904eef to your computer and use it in GitHub Desktop.
Eliminar itens duplicados no array com 1 linha em javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const set = new Set([1,1,2,2,3,3,4,4,5,5]) | |
const array = Array.from(set) | |
console.log(array) //(5) [1, 2, 3, 4, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment