Last active
May 16, 2016 10:21
-
-
Save mariyadiminsky/cb6d6fb9accf0a71edf453ea4eb21fa3 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/3mu5r6vg/ | |
var bunny = { | |
name: 'Usagi', | |
tasks: ['transform', 'eat cake', 'blow kisses'], | |
showTasks: function() { | |
var _this = this; | |
this.tasks.forEach(function(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