Skip to content

Instantly share code, notes, and snippets.

@marcodejongh
Created October 2, 2015 08:26
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 marcodejongh/59b52da25a7a993dd27a to your computer and use it in GitHub Desktop.
Save marcodejongh/59b52da25a7a993dd27a to your computer and use it in GitHub Desktop.
class SomeClass {
constructor() {
this.x = 0;
}
getX() {
return this.x;
}
setX(val) {
this.x = val;
}
}
function SomeClass () {
this.x = 0;
}
SomeClass.prototype.getX = function () {
return this.x;
};
SomeClass.prototype.setX = function (val) {
this.x = val;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment