Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created March 28, 2019 02:33
Show Gist options
  • Select an option

  • Save deleteman/43f88992735df57ca42154810f1466cf to your computer and use it in GitHub Desktop.

Select an option

Save deleteman/43f88992735df57ca42154810f1466cf to your computer and use it in GitHub Desktop.
Iterating over an object's properties
class Obj {
constructor() {
this.a = 1
this.b = 1
this.c = 1
}
method(st){
}
}
let obj = new Obj()
for(m in obj) {
console.log(m)
}
console.log(Object.keys(obj))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment