此代码按预期打印"undefined":
console.log(foo());
function foo() {
return typeof a;
}
Run Code Online (Sandbox Code Playgroud)
这个崩溃时出现"a is not defined"错误:
const a = foo();
function foo() {
return typeof a;
}
Run Code Online (Sandbox Code Playgroud)
这是V8的错误还是预期的行为?
| 归档时间: |
|
| 查看次数: |
26 次 |
| 最近记录: |