Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cda6f7 commit cb43ac5Copy full SHA for cb43ac5
code-reuse-patterns/borrowing-methods.html
@@ -28,7 +28,8 @@
28
var two = {
29
name:'another object'
30
};
31
-
+
32
+ // apply two to original object one.
33
console.log(one.say.apply(two, ['hello'])); // "hello, another object"
34
35
// assigning to a variable
@@ -43,7 +44,7 @@
43
44
return callback('Hola');
45
}
46
- console.log(yetanother.method(one.say)); // "Holla, undefined"
47
+ console.log(yetanother.method(one.say)); // "Hola, undefined"
48
49
function bind(o, m) {
50
return function () {
@@ -79,4 +80,4 @@
79
80
// http://shop.oreilly.com/product/9780596806767.do
81
</script>
82
</body>
-</html>
83
+</html>
0 commit comments