Skip to content

Instantly share code, notes, and snippets.

View Bamblehorse's full-sized avatar
🙃
Coding | Writing | Meditating 🙂

Jon Wood Bamblehorse

🙃
Coding | Writing | Meditating 🙂
View GitHub Profile
@getify
getify / ex1-prototype-style.js
Last active January 7, 2024 11:58
OLOO (objects linked to other objects) pattern explored (with comparison to the prototype style of the same code)
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function() {
return "I am " + this.me;
};
function Bar(who) {
Foo.call(this,"Bar:" + who);