Skip to content

Instantly share code, notes, and snippets.

@jamesmanning
Created August 30, 2014 00:12
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 jamesmanning/6c2f6395cbbb1218c20f to your computer and use it in GitHub Desktop.
Save jamesmanning/6c2f6395cbbb1218c20f to your computer and use it in GitHub Desktop.
simple class example
class Foo {
constructor(someCtorParam) {
this.someClassVar = someCtorParam;
}
someMethod() {
console.log('in some method: ' + this.someClassVar);
}
}
var foo = new Foo('passed-in string value');
foo.someMethod();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment