Skip to content

Commit

Permalink
Update borrowing-methods.html
Browse files Browse the repository at this point in the history
  • Loading branch information
chilijung committed Aug 1, 2013
1 parent 9cda6f7 commit cb43ac5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code-reuse-patterns/borrowing-methods.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
var two = {
name:'another object'
};


// apply two to original object one.
console.log(one.say.apply(two, ['hello'])); // "hello, another object"

// assigning to a variable
Expand All @@ -43,7 +44,7 @@
return callback('Hola');
}
};
console.log(yetanother.method(one.say)); // "Holla, undefined"
console.log(yetanother.method(one.say)); // "Hola, undefined"

function bind(o, m) {
return function () {
Expand Down Expand Up @@ -79,4 +80,4 @@
// http://shop.oreilly.com/product/9780596806767.do
</script>
</body>
</html>
</html>

0 comments on commit cb43ac5

Please sign in to comment.