Skip to content

Instantly share code, notes, and snippets.

@luijar
Created September 25, 2015 22:13
Show Gist options
  • Save luijar/7fb9779795da0cdf6bff to your computer and use it in GitHub Desktop.
Save luijar/7fb9779795da0cdf6bff to your computer and use it in GitHub Desktop.
Simple person class
class Person {
constructor(firstname, lastname) {
this._firstname = firstname;
this._lastname = lastname;
}
set firstname(f) {
this._firstname = f;
}
set lastname(l) {
this._lastname = l;
}
get firstname() {
return this._firstname;
}
get lastname() {
return this._lastname;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment