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 0b4bd16 commit 62676ddCopy full SHA for 62676dd
1 file changed
1-js/06-advanced-functions/07-new-function/article.md
@@ -53,13 +53,13 @@ func();
53
```js run
54
55
function getFunc() {
56
-let value = "test";
+ let value = "test";
57
58
-*!*
59
-let func = new Function('alert(value)');
60
-*/!*
+ *!*
+ let func = new Function('alert(value)');
+ */!*
61
62
-return func;
+ return func;
63
}
64
65
getFunc()(); // ошибка: значение не определено
@@ -69,13 +69,13 @@ getFunc()(); // ошибка: значение не определено
69
70
71
72
73
74
75
-let func = function() { alert(value); };
76
+ let func = function() { alert(value); };
77
78
79
80
81
getFunc()(); // *!*"test"*/!*, из лексического окружения функции getFunc
0 commit comments