Skip to content

Instantly share code, notes, and snippets.

@hillal20
Created September 11, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hillal20/22c42a269e918e3ffa87b32fcd4668f3 to your computer and use it in GitHub Desktop.
Save hillal20/22c42a269e918e3ffa87b32fcd4668f3 to your computer and use it in GitHub Desktop.
set vs obj
let numbers = [1,5,3,6,3,3,1]
let st = new Set(numbers)
console.log(st)
for ( let i of st ){
console.log(i)
}
console.log('billal')
let obj = { bill:"b", hill:'h'}
for ( let i in obj){
console.log(i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment