Skip to content

Commit a3df76d

Browse files
committed
Test for in-out function scope variables transfer
1 parent 0409005 commit a3df76d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/scope-nested-call.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
var method = 'foo';
2-
var obj = {
2+
var objOutside = {
33
foo: function () {
44
return 'bar';
55
},
66
};
77

88
var foo = function () {
9-
return obj[method]();
9+
var objInside = objOutside;
10+
11+
return objInside[method]();
1012
};
1113

1214
return foo();

0 commit comments

Comments
 (0)