Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created January 28, 2017 21:54
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 cyrilletuzi/5897a5a91fbf3740536b4f6fefe8669c to your computer and use it in GitHub Desktop.
Save cyrilletuzi/5897a5a91fbf3740536b4f6fefe8669c to your computer and use it in GitHub Desktop.
class User {
get firstName() {
return this._firstName;
}
set firstName(newFirstName) {
this._firstName = newFirstName;
}
}
myUser = new User('Henri');
myUser.firstName;
myUser.firstName = 'New name';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment