我不明白这一刻:
https://tc39.github.io/ecma262/#sec-function-definitions-runtime-semantics-instantiatefunctionobject
With parameter scope.
FunctionDeclaration: function BindingIdentifier(FormalParameters) {FunctionBody}
1. If the function code for FunctionDeclaration is strict mode code, let strict
be true. Otherwise let strict be false.
2. Let name be StringValue of BindingIdentifier.
3. Let F be FunctionCreate(Normal, FormalParameters, FunctionBody, scope, strict).
4. Perform MakeConstructor(F).
5. Perform SetFunctionName(F, name).
6. Return F.`什么等于作用域(查看FunctionCreate)?的参数)在ECMAScript中,没有一个关于范围的词。什么意思:With parameter scope.
发布于 2017-12-20 07:53:10
这意味着InstantiateFunctionObject算法有一个参数,该参数随后被命名为“作用域”。当应用该过程时,将传递一个值,例如
让
fo是使用参数lexEnv为f执行InstantiateFunctionObject的结果。
一般来说,作用域是指定义函数的词法环境,它将结束。
https://stackoverflow.com/questions/47900458
复制相似问题