Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alex-popov-tech/669e6c88fa3383f420dd6727c3f4c010 to your computer and use it in GitHub Desktop.
Save alex-popov-tech/669e6c88fa3383f420dd6727c3f4c010 to your computer and use it in GitHub Desktop.
class Guest {
constructor() {
// BEGIN (write your solution here)
// END
this.name = 'Guest';
}
getName() {
return this.name;
}
// BEGIN (write your solution here)
greet() {
return `Nice to meet you ${this.name}!`;
}
// END
}
class User {
constructor(name) {
// BEGIN (write your solution here)
// END
this.name = name;
}
getName() {
return this.name;
}
// BEGIN (write your solution here)
greet() {
return `Hello ${this.name}!`;
}
// END
}
// BEGIN (write your solution here)
export default (user) => user.greet();
// END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment