function howOldAmI()
{
    document.write('You are '+ this.age +' years old. <br/>')
}

var age = 15;
var ema = {
   age : 16,
   howOldAmI : howOldAmI
}
var angela = {
   age : 17,
   howOldAmI : howOldAmI
}

howOldAmI(); // Context is global i.e. window, so window.age will be used
ema.howOldAmI(); // ema is calling, so ema is context, ema.age will be used
angela.howOldAmI(); // angela is calling, so angela is context, angela.age will be used

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.