Created
July 16, 2015 13:49
-
-
Save wilk/3699c538b69fb5a2f1ae to your computer and use it in GitHub Desktop.
ES6 Object properties
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
let person = { | |
introduce() { | |
console.log('My name is Mario') | |
}, | |
['say' + 'My' + 'Name']() { | |
console.log('Mario') | |
} | |
} | |
person.introduce() // My name is Mario | |
person.sayMyName() // Mario |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment