JavaScript 参考

JavaScript 参考充当有关 JavaScript 语言的事实存储库。这里详细描述了整个语言。当你编写 JavaScript 代码时,你将经常引用这些页面(因此标题为 "JavaScript 参考")。

¥The JavaScript reference serves as a repository of facts about the JavaScript language. The entire language is described here in detail. As you write JavaScript code, you'll refer to these pages often (thus the title "JavaScript reference").

JavaScript 语言旨在在一些更大的环境中使用,无论是浏览器、服务器端脚本还是类似的环境。在大多数情况下,此参考尝试与环境无关,并且不针对 Web 浏览器环境。

¥The JavaScript language is intended to be used within some larger environment, be it a browser, server-side scripts, or similar. For the most part, this reference attempts to be environment-agnostic and does not target a web browser environment.

如果你是 JavaScript 新手,请从 guide 开始。一旦牢牢掌握了基础知识,你就可以使用参考来获取有关各个对象和语言构造的更多详细信息。

¥If you are new to JavaScript, start with the guide. Once you have a firm grasp of the fundamentals, you can use the reference to get more details on individual objects and language constructs.

内置

¥Built-ins

JavaScript 标准内置对象,以及它们的方法和属性。

¥JavaScript standard built-in objects, along with their methods and properties.

值属性

¥Value properties

函数属性

基本对象

¥Fundamental objects

错误对象

数字和日期

¥Numbers and dates

文本处理

¥Text processing

索引集合

键控集合

¥Keyed collections

结构化数据

管理内存

¥Managing memory

控制抽象对象

反射

¥Reflection

国际化

语句

控制流

声明变量

¥Declaring variables

函数和类

迭代

其他的

表达式和运算符

主要表达方式

左侧表达式

自增和自减

¥Increment and decrement

一元运算符

¥Unary operators

算术运算符

¥Arithmetic operators

关系运算符

¥Relational operators

相等运算符

¥Equality operators

按位移位运算符

¥Bitwise shift operators

二元按位运算符

¥Binary bitwise operators

二元逻辑运算符

¥Binary logical operators

条件(三元)运算符

¥Conditional (ternary) operator

赋值运算符

收益算子

¥Yield operators

扩展语法

¥Spread syntax

逗号运算符

¥Comma operator

函数

附加参考页