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 62676dd commit 64e1646Copy full SHA for 64e1646
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