Created
January 19, 2019 16:11
-
-
Save mateusmarquezini/4d4a4312804523c9218a03acf1c5fadf to your computer and use it in GitHub Desktop.
This file contains 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
let set1 = new Set([1, "dois", 3, "quatro", 5]) | |
let set2 = new Set() | |
set2.add(1) | |
set2.add(2) | |
set2.add(3) | |
set2.add(4) | |
set2.add(5) | |
for (valor of set1){ | |
console.log(valor) // 1, dois, 3, quatro, 5 | |
} | |
for (valor of set2){ | |
console.log(valor) // 1, 2, 3, 4, 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment