js bind example on function
function() this context controlled from bind keyword.
JavaScript
var myModule = {
name: 'David',
getName: function() {
return console.log(this.name);
}
}
myModule.getName();
var someName = myModule.getName.bind({name:'Bob'});
someName();