bind
var obj = { location: 'Paris, France', getLocation: function() { return this.location; } // getLocation }; function show(getter) { alert(getter()); } // show show(obj.getLocation);
var obj = { location: 'Paris, France', getLocation: function() { return this.location; } // getLocation }; function show(getter) { alert(getter()); } // show show(obj.getLocation.bind(obj));