var Foo = {
init: function(who) {
this.me = who;
},
identify: function() {
return "I am " + this.me;
}
}
var Bar = Object.create(Foo);
Bar.speak = function () {
console.log('Hello, ' + this.identify() + ".");
}
var b1 = Object.create(Bar);
b1.init('b1')
b1.speak();
Last active
September 30, 2016 03:38
-
-
Save RyanCCollins/e1358e83b1a54f5df97bd6578793f024 to your computer and use it in GitHub Desktop.
OOLO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment