Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 10, 2014 20:08
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 devdays/3db60918f814ebe2534d to your computer and use it in GitHub Desktop.
Save devdays/3db60918f814ebe2534d to your computer and use it in GitHub Desktop.
Object JavaScript - Classes sample in ECMAScript 6
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
toString() {
return '(' + this.x + ',' + this.y + ')';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment