Created
July 11, 2020 15:49
-
-
Save pads/c557162b2937abd68562837710fd51a3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// https://github.com/CodeYourFuture/JavaScript-Core-2-Homework/blob/master/Week-1/InClass/D-methods/exercise-1.js | |
/* | |
A person named Alice is defined below. | |
Add a method "greet" so this person can say hello. | |
*/ | |
let person = { | |
name: "Alice", | |
age: 25, | |
greet() { | |
return "Hello everybody"; | |
} | |
}; | |
/* | |
DO NOT EDIT ANYTHING BELOW THIS LINE | |
*/ | |
console.log(`Expected result: Hello everybody. Actual result: ${person.greet()}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment