JavaScript 表达式


默认的求值器支持 JavaScript 表达式的直接求值:

> 1 + 1
2
> const m = 2
undefined
> m + 1
3

除非在块或函数内另有作用域,否则隐式声明或使用 constletvar 关键字声明的变量在全局作用域内声明。

The default evaluator supports direct evaluation of JavaScript expressions:

> 1 + 1
2
> const m = 2
undefined
> m + 1
3

Unless otherwise scoped within blocks or functions, variables declared either implicitly or using the const, let, or var keywords are declared at the global scope.