javascript wtfs episode 4
TRANSCRIPT
JavaScriptWTFs
Lorenzo Baracchi
EPISODE 4
Prototype
Person
Alice Bob
Person
Alice Bob
name: alice age: 24
name: bob age: 42
Person
Alice Bob
name: alice age: 24
name: bob age: 42
Person
Alice Bob
name: alice age: 24
name: bob age: 42
?
youngherThan = function(x){ … } youngherThan = function(x){ … }
Person
Alice Bob
name: alice age: 24
name: bob age: 42
__proto__ __proto__
Person. prototype
Alice Bob
__proto__ __proto__
Personprototype
Person. prototype
Alice Bob
__proto__ __proto__
Personprototype
ObjectprototypeObject.
prototype
__proto__