Skip to content

Instantly share code, notes, and snippets.

@Storyyeller
Last active January 10, 2018 02:39
Show Gist options
  • Save Storyyeller/a47301cc37157a69e5ada44ec67eddce to your computer and use it in GitHub Desktop.
Save Storyyeller/a47301cc37157a69e5ada44ec67eddce to your computer and use it in GitHub Desktop.
class Foo {
constructor(x) {
this.x = x;
this.y = 432;
}
point() {
return 'Foo(' + this.x + ', ' + this.y + ')';
}
}
let myfoo = new Foo(99);
console.log(myfoo.point()); // prints "Foo(99, 432)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment