Skip to content

Instantly share code, notes, and snippets.

@pads
Created July 11, 2020 15:49
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 pads/c557162b2937abd68562837710fd51a3 to your computer and use it in GitHub Desktop.
Save pads/c557162b2937abd68562837710fd51a3 to your computer and use it in GitHub Desktop.
// 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