Created
May 27, 2020 15:58
-
-
Save alex-popov-tech/669e6c88fa3383f420dd6727c3f4c010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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