// Example 7. 'this' binding with bind() var bulbasaur = { pokédexNo: "001", getPokédexNo: function() { return this.pokédexNo; } }; var unboundGetPokédexNo = bulbasaur.getPokédexNo; console.log(unboundGetPokédexNo()); // The function gets invoked at the global scope // Output: undefined var boundGetPokédexNo = unboundGetPokédexNo.bind(bulbasaur); console.log(boundGetPokédexNo()); // Output: "001"