Created
May 16, 2016 10:29
-
-
Save mariyadiminsky/ce75c8e09e41b08a725c38e4e254ab74 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
// Test it here: https://jsfiddle.net/maasha/che8m4c1/ | |
var bunny = { | |
name: 'Usagi', | |
tasks: ['transform', 'eat cake', 'blow kisses'], | |
showTasks() { | |
this.tasks.forEach((task) => { | |
alert(this.name + " wants to " + task); | |
}); | |
} | |
}; | |
bunny.showTasks(); | |
// Usagi wants to transform | |
// Usagi wants to eat cake | |
// Usagi wants to blow kisses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment