Created
September 13, 2016 13:10
-
-
Save michacom/25c238a05ae5e08df11cbeeb7ac59a66 to your computer and use it in GitHub Desktop.
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
person = { | |
firstName: 'Moshe', | |
lastName: 'Cohen', | |
moods: ['happy', 'angry', 'sad'], | |
giveMeName: function () { | |
this.moods.forEach((mood) => { | |
console.log(this.firstName + " " + this.lastName + ' Can be ' + mood); | |
}); | |
} | |
} |
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
person = { | |
firstName: 'Moshe', | |
lastName: 'Cohen', | |
moods: ['happy', 'angry', 'sad'], | |
giveMeName: function () { | |
this.moods.forEach( | |
function(mood) { | |
console.log(this.firstName + " " + this.lastName + ' Can be ' + mood); | |
}, | |
this | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment