Skip to content

Instantly share code, notes, and snippets.

@rumikotakahashi
Forked from lspdv/quiz.js
Created September 4, 2017 05:28
Show Gist options
  • Select an option

  • Save rumikotakahashi/e8c4305594ea2b55bd2ca96eb0f0819f to your computer and use it in GitHub Desktop.

Select an option

Save rumikotakahashi/e8c4305594ea2b55bd2ca96eb0f0819f to your computer and use it in GitHub Desktop.
Given the following code, I understand what the output will be:
const obj = {
name: 'John',
getName () {
return this.name;
}
};
const name1 = obj.getName();
const getName = obj.getName;
const name2 = getName();
console.log(`${name1} ${name2}`);
@rumikotakahashi
Copy link
Copy Markdown
Author

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment