In this lesson we introduce the "this" keyword in JavaScript as well as talk about "implicit binding" or the first rule in discovering what the "this" keyword is referencing.
I tried doing the exact code you did, but it returns 'undefined', why?
var sayNameMixin = function(obj){
obj.sayName = function(){
console.log(this.name);
};
};
var me = {
name: 'Tyler',
age: 25
};
var you = {
name: 'Joey',
age: 21
};
sayNameMixin(me);