Skip to content

Commit 2b6675a

Browse files
author
YuChengKai
authored
Merge pull request #85 from timeTravelCYN/master
fix `this` example
2 parents 9e90796 + b4e8efb commit 2b6675a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

JS/JS-ch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function instanceof(left, right) {
301301
function foo() {
302302
console.log(this.a)
303303
}
304-
var a = 2
304+
var a = 1
305305
foo()
306306

307307
var obj = {

JS/JS-en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ As for the latter, it first executes `new Foo()` to create an instance, then fin
251251
function foo() {
252252
console.log(this.a);
253253
}
254-
var a = 2;
254+
var a = 1;
255255
foo();
256256

257257
var obj = {

0 commit comments

Comments
 (0)