Skip to content

Instantly share code, notes, and snippets.

@sourabh86
Last active August 29, 2015 14:15
Show Gist options
  • Save sourabh86/24e548fdea7e38e411d1 to your computer and use it in GitHub Desktop.
Save sourabh86/24e548fdea7e38e411d1 to your computer and use it in GitHub Desktop.
Class in ES6
class NewClass extends DummyClass {
constructor(variableA, variableB) {
super(variableA, variableB);
this.id = NewClass.defaulIdGenerator();
this.elements = [];
//...
}
update(test) {
//...
super.update();
}
static defaultIdGenerator() {
return new DummyClass.Id();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment