Last active
May 21, 2019 15:34
-
-
Save dHelmgren/57e9dc03962e18088d6bf01721127522 to your computer and use it in GitHub Desktop.
Captain Marvel Example
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
const captainMarvel = { | |
givenName: 'Carol Danvers', | |
nickname: 'Vers', | |
age: 41, | |
sideburns: false, | |
affiliations: ["The Avengers", "S.H.I.E.L.D.", "The Starjammers"], | |
fly() { | |
console.log('zoom!'); | |
console.log('swish!'); | |
console.log('fweeee!'); | |
}, | |
getResume() { | |
for(let i = 0; i < this.affiliations.length; i += 1){ | |
console.log(`I'm a member of ${this.affiliations[i]}`); | |
} | |
console.log('I have a long and storied history, okay?') | |
} | |
} | |
captainMarvel.getResume() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment