JavaScript:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
无编辑摘要
 
(未显示同一用户的2个中间版本)
第37行: 第37行:
=== 编译器 ===
=== 编译器 ===
示例: [https://github.com/jamiebuilds/the-super-tiny-compiler the-super-tiny-compiler]、[https://github.com/ftomassetti/LangSandbox LangSandbox]
示例: [https://github.com/jamiebuilds/the-super-tiny-compiler the-super-tiny-compiler]、[https://github.com/ftomassetti/LangSandbox LangSandbox]
== 沙箱 Sandbox ==
[[/sandbox|sandbox]]


== ES6 ==
== ES6 ==
第242行: 第244行:


=== 平方 ===
=== 平方 ===
{{leftrightflex|<syntaxhighlight lang="javascript">
{{Double-columns|<syntaxhighlight lang="javascript">
3**2</syntaxhighlight>|{{consoleout|<pre>
3**2</syntaxhighlight>|{{consoleout|<pre>
9
9
第276行: 第278行:
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例
| 示例 || 示例 || 示例 || 示例 || 示例 || 示例
|}
|}
== worker ==
[[/worker|worker]]
== 函数 ==
== 函数 ==
JavaScript 的函数主要基于词法作用域(lexical scoping),并且函数是顶级对象。
JavaScript 的函数主要基于词法作用域(lexical scoping),并且函数是顶级对象。