Skip to content

Commit 20970be

Browse files
committed
Add some minimal explanation
1 parent 1afebba commit 20970be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/this.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ created `Object`.
3939
function foo(a, b, c) {}
4040
4141
var bar = {};
42-
foo.apply(bar, [1, 2, 3]);
43-
foo.call(bar, 1, 2, 3);
42+
foo.apply(bar, [1, 2, 3]); // array will expand to the below
43+
foo.call(bar, 1, 2, 3); // results in a = 1, b = 2, c = 3
4444

4545
When using the `call` or `apply` methods of `Function.prototype`, the value of
4646
`this` inside the called function gets explicitly set to the first argument of

0 commit comments

Comments
 (0)