Skip to content

Commit 9dfe710

Browse files
author
Chris Anderson
committed
change 'that' to 'self'
1 parent 1f91a84 commit 9dfe710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/en/function/this.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ In order to gain access to `Foo` from within `test`, it is necessary to create a
7272
local variable inside of `method` that refers to `Foo`.
7373

7474
Foo.method = function() {
75-
var that = this;
75+
var self = this;
7676
function test() {
77-
// Use that instead of this here
77+
// Use self instead of this here
7878
}
7979
test();
8080
}
8181

82-
`that` is just a normal variable name, but it is commonly used for the reference to an
82+
`self` is just a normal variable name, but it is commonly used for the reference to an
8383
outer `this`. In combination with [closures](#function.closures), it can also
8484
be used to pass `this` values around.
8585

0 commit comments

Comments
 (0)