diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/javascript/reference/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/javascript/reference/index.html')
-rw-r--r-- | files/zh-cn/web/javascript/reference/index.html | 423 |
1 files changed, 423 insertions, 0 deletions
diff --git a/files/zh-cn/web/javascript/reference/index.html b/files/zh-cn/web/javascript/reference/index.html new file mode 100644 index 0000000000..dd190e13e5 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/index.html @@ -0,0 +1,423 @@ +--- +title: JavaScript 参考 +slug: Web/JavaScript/Reference +tags: + - ECMAScript + - JS + - JavaScript + - 参考 +translation_of: Web/JavaScript/Reference +--- +<div>{{JsSidebar}}</div> + +<div>在 MDN 的 JavaScript 分区中,这一部分被作为 Javascript 的资料库。阅读<a href="/zh-CN/docs/Web/JavaScript/Reference/About">关于该参考</a>以了解更多。</div> + +<h2 id="内置">内置</h2> + +<p>{{JSxRef("Global_Objects", "JavaScript 标准内置对象")}}, 以及他们的方法和属性.</p> + +<ul class="card-grid"> + <li> + <h4 id="值属性">值属性</h4> + + <ul> + <li>{{JSxRef("Infinity")}}</li> + <li>{{JSxRef("NaN")}}</li> + <li>{{JSxRef("undefined")}}</li> + <li>{{JSxRef("globalThis")}}</li> + </ul> + </li> + <li> + <h4 id="Function_属性">Function 属性</h4> + + <ul> + <li>{{JSxRef("Global_Objects/eval", "eval()")}}</li> + <li>{{JSxRef("Global_Objects/isFinite", "isFinite()")}}</li> + <li>{{JSxRef("Global_Objects/isNaN", "isNaN()")}}</li> + <li>{{JSxRef("Global_Objects/parseFloat", "parseFloat()")}}</li> + <li>{{JSxRef("Global_Objects/parseInt", "parseInt()")}}</li> + <li>{{JSxRef("Global_Objects/decodeURI", "decodeURI()")}}</li> + <li>{{JSxRef("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}</li> + <li>{{JSxRef("Global_Objects/encodeURI", "encodeURI()")}}</li> + <li>{{JSxRef("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</li> + </ul> + </li> + <li> + <h4 id="基本对象">基本对象</h4> + + <ul> + <li>{{JSxRef("Object")}}</li> + <li>{{JSxRef("Function")}}</li> + <li>{{JSxRef("Boolean")}}</li> + <li>{{JSxRef("Symbol")}}</li> + </ul> + </li> + <li> + <h4 id="错误对象">错误对象</h4> + + <ul> + <li>{{JSxRef("Error")}}</li> + <li>{{JSxRef("AggregateError")}}</li> + <li>{{JSxRef("EvalError")}}</li> + <li>{{JSxRef("InternalError")}}</li> + <li>{{JSxRef("RangeError")}}</li> + <li>{{JSxRef("ReferenceError")}}</li> + <li>{{JSxRef("SyntaxError")}}</li> + <li>{{JSxRef("TypeError")}}</li> + <li>{{JSxRef("URIError")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li> + <h4 id="Numbers_dates">Numbers & dates</h4> + + <ul> + <li>{{JSxRef("Number")}}</li> + <li>{{JSxRef("BigInt")}}</li> + <li>{{JSxRef("Math")}}</li> + <li>{{JSxRef("Date")}}</li> + </ul> + </li> + <li> + <h4 id="文本处理">文本处理</h4> + + <ul> + <li>{{JSxRef("String")}} {{JSxRef("RegExp")}}</li> + </ul> + </li> + <li> + <h4 id="索引集合类">索引集合类</h4> + + <ul> + <li>{{JSxRef("Array")}}</li> + <li>{{JSxRef("Int8Array")}}</li> + <li>{{JSxRef("Uint8Array")}}</li> + <li>{{JSxRef("Uint8ClampedArray")}}</li> + <li>{{JSxRef("Int16Array")}}</li> + <li>{{JSxRef("Uint16Array")}}</li> + <li>{{JSxRef("Int32Array")}}</li> + <li>{{JSxRef("Uint32Array")}}</li> + <li>{{JSxRef("Float32Array")}}</li> + <li>{{JSxRef("Float64Array")}}</li> + <li>{{JSxRef("BigInt64Array")}}</li> + <li>{{JSxRef("BigUint64Array")}}</li> + </ul> + </li> + <li> + <h4 id="Keyed_collections">Keyed collections</h4> + + <ul> + <li>{{JSxRef("Map")}}</li> + <li>{{JSxRef("Set")}}</li> + <li>{{JSxRef("WeakMap")}}</li> + <li>{{JSxRef("WeakSet")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li> + <h4 id="结构化数据">结构化数据</h4> + + <ul> + <li>{{JSxRef("ArrayBuffer")}}</li> + <li>{{JSxRef("SharedArrayBuffer")}}</li> + <li>{{JSxRef("Atomics")}}</li> + <li>{{JSxRef("DataView")}}</li> + <li>{{JSxRef("JSON")}}</li> + </ul> + </li> + <li> + <h4 id="控制抽象化">控制抽象化</h4> + + <ul> + <li>{{JSxRef("Promise")}}</li> + <li>{{JSxRef("Generator")}}</li> + <li>{{JSxRef("GeneratorFunction")}}</li> + <li>{{JSxRef("AsyncFunction")}}</li> + </ul> + </li> + <li> + <h4 id="反射">反射</h4> + + <ul> + <li>{{JSxRef("Reflect")}}</li> + <li>{{JSxRef("Proxy")}}</li> + </ul> + </li> + <li> + <h4 id="国际化">国际化</h4> + + <ul> + <li>{{JSxRef("Intl")}}</li> + <li>{{JSxRef("Global_Objects/Intl/Collator", "Intl.Collator")}}</li> + <li>{{JSxRef("Global_Objects/Intl/DateTimeFormat", "Intl.DateTimeFormat")}}</li> + <li>{{JSxRef("Global_Objects/Intl/DisplayNames", "Intl.DisplayNames")}}</li> + <li>{{JSxRef("Global_Objects/Intl/ListFormat", "Intl.ListFormat")}}</li> + <li>{{JSxRef("Global_Objects/Intl/Locale", "Intl.Locale")}}</li> + <li>{{JSxRef("Global_Objects/Intl/NumberFormat", "Intl.NumberFormat")}}</li> + <li>{{JSxRef("Global_Objects/Intl/PluralRules", "Intl.PluralRules")}}</li> + <li>{{JSxRef("Global_Objects/Intl/RelativeTimeFormat", "Intl.RelativeTimeFormat")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li><span>WebAssembly</span> + + <ul> + <li>{{JSxRef("WebAssembly")}}</li> + <li>{{JSxRef("WebAssembly.Module")}}</li> + <li>{{JSxRef("WebAssembly.Instance")}}</li> + <li>{{JSxRef("WebAssembly.Memory")}}</li> + <li>{{JSxRef("WebAssembly.Table")}}</li> + <li>{{JSxRef("WebAssembly.CompileError")}}</li> + <li>{{JSxRef("WebAssembly.LinkError")}}</li> + <li>{{JSxRef("WebAssembly.RuntimeError")}}</li> + </ul> + </li> +</ul> + +<h2 id="语句">语句</h2> + +<p>{{JSxRef("Statements", "语句和声明")}}</p> + +<ul class="card-grid"> + <li> + <h4 id="控制流">控制流</h4> + + <ul> + <li>{{jsxref("Statements/block", "Block")}}</li> + <li>{{jsxref("Statements/break", "break")}}</li> + <li>{{jsxref("Statements/continue", "continue")}}</li> + <li>{{jsxref("Statements/Empty", "Empty")}}</li> + <li>{{jsxref("Statements/if...else", "if...else")}}</li> + <li>{{jsxref("Statements/switch", "switch")}}</li> + <li>{{jsxref("Statements/throw", "throw")}}</li> + <li>{{jsxref("Statements/try...catch", "try...catch")}}</li> + </ul> + </li> + <li> + <h4 id="声明">声明</h4> + + <ul> + <li>{{jsxref("Statements/var", "var")}}</li> + <li>{{jsxref("Statements/let", "let")}}</li> + <li>{{jsxref("Statements/const", "const")}}</li> + </ul> + </li> + <li> + <h4 id="函数和类">函数和类</h4> + + <ul> + <li>{{jsxref("Statements/function", "function")}}</li> + <li>{{jsxref("Statements/function*", "function*")}}</li> + <li>{{jsxref("Statements/async_function", "async function")}}</li> + <li>{{jsxref("Statements/return", "return")}}</li> + <li>{{jsxref("Statements/class", "class")}}</li> + </ul> + </li> + <li> + <h4 id="迭代">迭代</h4> + + <ul> + <li>{{jsxref("Statements/do...while", "do...while")}}</li> + <li>{{jsxref("Statements/for", "for")}}</li> + <li>{{jsxref("Statements/for_each...in", "for each...in")}}</li> + <li>{{jsxref("Statements/for...in", "for...in")}}</li> + <li>{{jsxref("Statements/for...of", "for...of")}}</li> + <li>{{jsxref("Statements/for-await...of", "for await...of")}}</li> + <li>{{jsxref("Statements/while", "while")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li> + <h4 id="其他">其他</h4> + + <ul> + <li>{{jsxref("Statements/debugger", "debugger")}}</li> + <li>{{jsxref("Statements/import", "import")}}</li> + <li>{{jsxref("Statements/label", "label")}}</li> + <li>{{jsxref("Statements/with", "with")}}</li> + </ul> + </li> +</ul> + +<h2 id="表达式和运算符">表达式和运算符</h2> + +<p>{{JSxRef("Operators", "表达式和运算符")}}. </p> + +<div> +<ul class="card-grid"> + <li> + <h4 id="Primary_expressions">Primary expressions</h4> + + <ul> + <li>{{JSxRef("Operators/this", "this")}}</li> + <li>{{JSxRef("Operators/function", "function")}}</li> + <li>{{JSxRef("Operators/class", "class")}}</li> + <li>{{JSxRef("Operators/function*", "function*")}}</li> + <li>{{JSxRef("Operators/yield", "yield")}}</li> + <li>{{JSxRef("Operators/yield*", "yield*")}}</li> + <li>{{JSxRef("Operators/async_function", "async function")}}</li> + <li>{{JSxRef("Operators/await", "await")}}</li> + <li>{{JSxRef("Global_Objects/Array", "[]")}}</li> + <li>{{JSxRef("Operators/Object_initializer", "{}")}}</li> + <li>{{JSxRef("Global_Objects/RegExp", "/ab+c/i")}}</li> + <li>{{JSxRef("Operators/Grouping", "( )")}}</li> + <li>{{JSxRef("null")}}</li> + </ul> + </li> + <li> + <h4 id="Left-hand-side_expressions">Left-hand-side expressions</h4> + + <ul> + <li>{{JSxRef("Operators/Property_accessors", "Property accessors", "", 1)}}</li> + <li>{{JSxRef("Operators/new", "new")}}</li> + <li>{{JSxRef("Operators/new%2Etarget", "new.target")}}</li> + <li>{{JSxRef("Operators/super", "super")}}</li> + <li>{{JSxRef("Operators/Spread_syntax", "...obj")}}</li> + </ul> + </li> + <li> + <h4 id="Increment_decrement">Increment & decrement</h4> + + <ul> + <li>{{JSxRef("Operators/Arithmetic_Operators", "A++", "#Increment")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "A--", "#Decrement")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "++A", "#Increment")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "--A", "#Decrement")}}</li> + </ul> + </li> + <li> + <h4 id="一元运算符">一元运算符</h4> + + <ul> + <li>{{JSxRef("Operators/delete", "delete")}}</li> + <li>{{JSxRef("Operators/void", "void")}}</li> + <li>{{JSxRef("Operators/typeof", "typeof")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "+", "#Unary_plus")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "-", "#Unary_negation")}}</li> + <li>{{JSxRef("Operators/Bitwise_Operators", "~", "#Bitwise_NOT")}}</li> + <li>{{JSxRef("Operators/Logical_Operators", "!", "#Logical_NOT")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li> + <h4 id="算术运算符">算术运算符</h4> + + <ul> + <li>{{JSxRef("Operators/Arithmetic_Operators", "+", "#Addition")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "-", "#Subtraction")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "/", "#Division")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "*", "#Multiplication")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "%", "#Remainder")}}</li> + <li>{{JSxRef("Operators/Arithmetic_Operators", "**", "#Exponentiation")}}</li> + </ul> + </li> + <li> + <h4 id="关系运算符">关系运算符</h4> + + <ul> + <li>{{JSxRef("Operators/in", "in")}}</li> + <li>{{JSxRef("Operators/instanceof", "instanceof")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", "<", "#Less_than_operator")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", ">", "#Greater_than_operator")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", "<=", "#Less_than_or_equal_operator")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", ">=", "#Greater_than_or_equal_operator")}}</li> + </ul> + </li> + <li> + <h4 id="相等运算符">相等运算符</h4> + + <ul> + <li>{{JSxRef("Operators/Comparison_Operators", "==", "#Equality")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", "!=", "#Inequality")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", "===", "#Identity")}}</li> + <li>{{JSxRef("Operators/Comparison_Operators", "!==", "#Nonidentity")}}</li> + </ul> + </li> + <li> + <h4 id="位移运算符">位移运算符</h4> + + <ul> + <li>{{JSxRef("Operators/Bitwise_Operators", "<<", "#Left_shift")}}</li> + <li>{{JSxRef("Operators/Bitwise_Operators", ">>", "#Right_shift")}}</li> + <li>{{JSxRef("Operators/Bitwise_Operators", ">>>", "#Unsigned_right_shift")}}</li> + </ul> + </li> +</ul> + +<ul class="card-grid"> + <li> + <h4 id="位运算">位运算</h4> + + <ul> + <li>{{JSxRef("Operators/Bitwise_Operators", "&", "#Bitwise_AND")}}</li> + <li>{{JSxRef("Operators/Bitwise_Operators", "|", "#Bitwise_OR")}}</li> + <li>{{JSxRef("Operators/Bitwise_Operators", "^", "#Bitwise_XOR")}}</li> + </ul> + </li> + <li> + <h4 id="逻辑运算">逻辑运算</h4> + + <ul> + <li>{{JSxRef("Operators/Logical_Operators", "&&", "#Logical_AND")}}</li> + <li>{{JSxRef("Operators/Logical_Operators", "||", "#Logical_OR")}}</li> + </ul> + </li> + <li> + <h4 id="条件运算符">条件运算符</h4> + + <ul> + <li>{{JSxRef("Operators/Conditional_Operator", "(condition ? ifTrue : ifFalse)")}}</li> + </ul> + </li> + <li> + <h4 id="赋值操作符">赋值操作符</h4> + + <ul> + <li>{{JSxRef("Operators/Assignment_Operators", "=", "#Assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "*=", "#Multiplication_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "/=", "#Division_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "%=", "#Remainder_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "+=", "#Addition_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "-=", "#Subtraction_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "<<=", "#Left_shift_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", ">>=", "#Right_shift_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", ">>>=", "#Unsigned_right_shift_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "&=", "#Bitwise_AND_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "^=", "#Bitwise_XOR_assignment")}}</li> + <li>{{JSxRef("Operators/Assignment_Operators", "|=", "#Bitwise_OR_assignment")}}</li> + <li>{{JSxRef("Operators/Destructuring_assignment", "[a, b] = [1, 2]")}}</li> + <li>{{JSxRef("Operators/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}</li> + </ul> + </li> +</ul> +</div> + +<h2 id="函数">函数</h2> + +<p>本章介绍如何使用 <a href="/zh-CN/docs/Web/JavaScript/Reference/Functions">JavaScript函数</a> 来开发应用程序。</p> + +<ul> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments"><code>arguments</code></a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions">箭头函数</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters">默认参数</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/rest_parameters">剩余参数</a></li> +</ul> + +<h2 id="附加参考页面">附加参考页面</h2> + +<ul> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar">词法文法</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Data_structures">数据类型和数据结构</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></li> + <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features">过时的特性</a></li> +</ul> |