-
-
Save CheezItMan/1b83e39cfc1a230555347545d9211d49 to your computer and use it in GitHub Desktop.
Captain Marvel Example
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
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