Skip to content

Instantly share code, notes, and snippets.

@mateusmarquezini
Created January 21, 2019 14:41
Show Gist options
  • Save mateusmarquezini/bb19a95d2ef2f8940e3456ba2a6805cf to your computer and use it in GitHub Desktop.
Save mateusmarquezini/bb19a95d2ef2f8940e3456ba2a6805cf to your computer and use it in GitHub Desktop.
let setDados = new Set()
setDados.add(1)
setDados.add(2)
setDados.add(3)
setDados.add(4)
setDados.add(5)
setDados.forEach(elemento =>
console.log(elemento) // 1, 2, 3, 4, 5
)
for(elemento of setDados){
console.log(elemento) // 1, 2, 3, 4, 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment