1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
---
title: Referência de JavaScript
slug: Web/JavaScript/Reference
tags:
- ECMAScript6
- ES6
- 'I10n:priority'
- JS
- JavaScript
- Programação
- Página Landing
- Referencia
- es
translation_of: Web/JavaScript/Reference
---
<div>{{JsSidebar}}</div>
<p>Esta parte da secção de JavaScript na MDN serve como um repositório de factos sobre a linguage JavaScript. Leia mais <a href="/pt-PT/docs/Web/JavaScript/Reference/Sobre">sobre esta referência</a>.</p>
<h2 id="Integrações">Integrações</h2>
<p><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects">Objetos integrados padrões de JavaScript</a>, em conjunto com os seus métodos e propriedades.</p>
<ul class="card-grid">
<li><span>Propriedades de Valor</span>
<p>{{JSxRef("Infinity")}}<br>
{{JSxRef("NaN")}}<br>
{{JSxRef("undefined")}}<br>
{{JSxRef("globalThis")}}</p>
</li>
<li><span>Propriedades de Função</span>
<p>{{JSxRef("Global_Objects/eval", "eval()")}}<br>
{{JSxRef("Global_Objects/isFinite", "isFinite()")}}<br>
{{JSxRef("Global_Objects/isNaN", "isNaN()")}}<br>
{{JSxRef("Global_Objects/parseFloat", "parseFloat()")}}<br>
{{JSxRef("Global_Objects/parseInt", "parseInt()")}}<br>
{{JSxRef("Global_Objects/decodeURI", "decodeURI()")}}<br>
{{JSxRef("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}<br>
{{JSxRef("Global_Objects/encodeURI", "encodeURI()")}}<br>
{{JSxRef("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</p>
</li>
<li><span>Objetos Fundamentais</span>
<p>{{JSxRef("Object")}}<br>
{{JSxRef("Function")}}<br>
{{JSxRef("Boolean")}}<br>
{{JSxRef("Symbol")}}</p>
</li>
<li><span>Objetos de Erro</span>
<p>{{JSxRef("Error")}}<br>
{{JSxRef("AggregateError")}}<br>
{{JSxRef("EvalError")}}<br>
{{JSxRef("InternalError")}}<br>
{{JSxRef("RangeError")}}<br>
{{JSxRef("ReferenceError")}}<br>
{{JSxRef("SyntaxError")}}<br>
{{JSxRef("TypeError")}}<br>
{{JSxRef("URIError")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>Números e Datas</span>
<p>{{JSxRef("Number")}}<br>
{{JSxRef("BigInt")}}<br>
{{JSxRef("Math")}}<br>
{{JSxRef("Date")}}</p>
</li>
<li><span>Processamento de Texto</span>
<p>{{JSxRef("String")}}<br>
{{JSxRef("RegExp")}}</p>
</li>
<li><span>Coleções Indexadas</span><a href="/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#Numbers"> </a>{{JSxRef("Array")}}<br>
{{JSxRef("Int8Array")}}<br>
{{JSxRef("Uint8Array")}}<br>
{{JSxRef("Uint8ClampedArray")}}<br>
{{JSxRef("Int16Array")}}<br>
{{JSxRef("Uint16Array")}}<br>
{{JSxRef("Int32Array")}}<br>
{{JSxRef("Uint32Array")}}<br>
{{JSxRef("Float32Array")}}<br>
{{JSxRef("Float64Array")}}<br>
{{JSxRef("BigInt64Array")}}<br>
{{JSxRef("BigUint64Array")}}</li>
<li><span>Coleções ''Keyed''</span>
<p>{{JSxRef("Map")}}<br>
{{JSxRef("Set")}}<br>
{{JSxRef("WeakMap")}}<br>
{{JSxRef("WeakSet")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>Dados Estruturados</span>
<p>{{JSxRef("ArrayBuffer")}}<br>
{{JSxRef("SharedArrayBuffer")}}<br>
{{JSxRef("Atomics")}}<br>
{{JSxRef("DataView")}}<br>
{{JSxRef("JSON")}}</p>
</li>
<li><span>Abstração de Controlo</span>
<p>{{JSxRef("Promise")}}<br>
{{JSxRef("Generator")}}<br>
{{JSxRef("GeneratorFunction")}}<br>
{{JSxRef("AsyncFunction")}}</p>
</li>
<li><span>Reflexão</span>
<p>{{JSxRef("Reflect")}}<br>
{{JSxRef("Proxy")}}</p>
</li>
<li><span>Internacionalização</span>
<p>{{JSxRef("Intl")}}<br>
{{JSxRef("Global_Objects/Collator", "Intl.Collator")}}<br>
{{JSxRef("Global_Objects/DateTimeFormat", "Intl.DateTimeFormat")}}<br>
{{JSxRef("Global_Objects/ListFormat", "Intl.ListFormat")}}<br>
{{JSxRef("Global_Objects/NumberFormat", "Intl.NumberFormat")}}<br>
{{JSxRef("Global_Objects/PluralRules", "Intl.PluralRules")}}<br>
{{JSxRef("Global_Objects/RelativeTimeFormat", "Intl.RelativeTimeFormat")}}<br>
{{JSxRef("Global_Objects/Locale", "Intl.Locale")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>WebAssembly</span>
<p>{{JSxRef("WebAssembly")}}<br>
{{JSxRef("WebAssembly.Module")}}<br>
{{JSxRef("WebAssembly.Instance")}}<br>
{{JSxRef("WebAssembly.Memory")}}<br>
{{JSxRef("WebAssembly.Table")}}<br>
{{JSxRef("WebAssembly.CompileError")}}<br>
{{JSxRef("WebAssembly.LinkError")}}<br>
{{JSxRef("WebAssembly.RuntimeError")}}</p>
</li>
</ul>
<h2 id="Declações_Statements">Declações (Statements)</h2>
<p><a href="/pt-PT/docs/Web/JavaScript/Reference/Extratos_e_declarações">Declarações e instruções de JavaScript</a></p>
<ul class="card-grid">
<li><span>Control flow</span>{{jsxref("Statements/block", "Block")}}<br>
{{jsxref("Statements/break", "break")}}<br>
{{jsxref("Statements/continue", "continue")}}<br>
{{jsxref("Statements/Empty", "Empty")}}<br>
{{jsxref("Statements/if...else", "if...else")}}<br>
{{jsxref("Statements/switch", "switch")}}<br>
{{jsxref("Statements/throw", "throw")}}<br>
{{jsxref("Statements/try...catch", "try...catch")}}</li>
<li><span>Declarations</span>
<p>{{jsxref("Statements/var", "var")}}<br>
{{jsxref("Statements/let", "let")}}<br>
{{jsxref("Statements/const", "const")}}</p>
</li>
<li><span>Functions and classes</span>
<p>{{jsxref("Statements/function", "function")}}<br>
{{jsxref("Statements/function*", "function*")}}<br>
{{jsxref("Statements/async_function", "async function")}}<br>
{{jsxref("Statements/return", "return")}}<br>
{{jsxref("Statements/class", "class")}}</p>
</li>
<li><span>Iterations</span>
<p>{{jsxref("Statements/do...while", "do...while")}}<br>
{{jsxref("Statements/for", "for")}}<br>
{{jsxref("Statements/for_each...in", "for each...in")}}<br>
{{jsxref("Statements/for...in", "for...in")}}<br>
{{jsxref("Statements/for...of", "for...of")}}<br>
{{jsxref("Statements/for-await...of", "for await...of")}}<br>
{{jsxref("Statements/while", "while")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>Outros</span>
<p>{{jsxref("Statements/debugger", "debugger")}}<br>
{{jsxref("Statements/import", "import")}}<br>
{{jsxref("Statements/label", "label")}}<br>
{{jsxref("Statements/with", "with")}}</p>
</li>
</ul>
<h2 id="Expressões_e_operadores">Expressões e operadores</h2>
<p><a href="/pt-PT/docs/Web/JavaScript/Reference/Operadores">Expressões e operadores de JavaScript</a>. </p>
<div>
<ul class="card-grid">
<li><span>Primary expressions</span>{{JSxRef("Operators/this", "this")}}<br>
{{JSxRef("Operators/function", "function")}}<br>
{{JSxRef("Operators/class", "class")}}<br>
{{JSxRef("Operators/function*", "function*")}}<br>
{{JSxRef("Operators/yield", "yield")}}<br>
{{JSxRef("Operators/yield*", "yield*")}}<br>
{{JSxRef("Operators/async_function", "async function")}}<br>
{{JSxRef("Operators/await", "await")}}<br>
{{JSxRef("Global_Objects/Array", "[]")}}<br>
{{JSxRef("Operators/Object_initializer", "{}")}}<br>
{{JSxRef("Global_Objects/RegExp", "/ab+c/i")}}<br>
{{JSxRef("Operators/Grouping", "( )")}}<br>
{{JSxRef("null")}}</li>
<li><span>Left-hand-side expressions</span>
<p>{{JSxRef("Operators/Property_accessors", "Property accessors", "", 1)}}<br>
{{JSxRef("Operators/new", "new")}}<br>
{{JSxRef("Operators/new%2Etarget", "new.target")}}<br>
{{JSxRef("Operators/super", "super")}}<br>
{{JSxRef("Operators/Spread_syntax", "...obj")}}</p>
</li>
<li><span>Increment & decrement</span>
<p>{{JSxRef("Operators/Arithmetic_Operators", "A++", "#Increment")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "A--", "#Decrement")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "++A", "#Increment")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "--A", "#Decrement")}}</p>
</li>
<li><span>Unary operators</span>
<p>{{JSxRef("Operators/delete", "delete")}}<br>
{{JSxRef("Operators/void", "void")}}<br>
{{JSxRef("Operators/typeof", "typeof")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "+", "#Unary_plus")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "-", "#Unary_negation")}}<br>
{{JSxRef("Operators/Bitwise_Operators", "~", "#Bitwise_NOT")}}<br>
{{JSxRef("Operators/Logical_Operators", "!", "#Logical_NOT")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>Arithmetic operators</span>
<p>{{JSxRef("Operators/Arithmetic_Operators", "+", "#Addition")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "-", "#Subtraction")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "/", "#Division")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "*", "#Multiplication")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "%", "#Remainder")}}<br>
{{JSxRef("Operators/Arithmetic_Operators", "**", "#Exponentiation")}}</p>
</li>
<li><span>Relational operators</span>
<p>{{JSxRef("Operators/in", "in")}}<br>
{{JSxRef("Operators/instanceof", "instanceof")}}<br>
{{JSxRef("Operators/Comparison_Operators", "<", "#Less_than_operator")}}<br>
{{JSxRef("Operators/Comparison_Operators", ">", "#Greater_than_operator")}}<br>
{{JSxRef("Operators/Comparison_Operators", "<=", "#Less_than_or_equal_operator")}}<br>
{{JSxRef("Operators/Comparison_Operators", ">=", "#Greater_than_or_equal_operator")}}</p>
</li>
<li><span>Equality operators</span>
<p>{{JSxRef("Operators/Comparison_Operators", "==", "#Equality")}}<br>
{{JSxRef("Operators/Comparison_Operators", "!=", "#Inequality")}}<br>
{{JSxRef("Operators/Comparison_Operators", "===", "#Identity")}}<br>
{{JSxRef("Operators/Comparison_Operators", "!==", "#Nonidentity")}}</p>
</li>
<li><span>Bitwise shift operators</span>
<p>{{JSxRef("Operators/Bitwise_Operators", "<<", "#Left_shift")}}<br>
{{JSxRef("Operators/Bitwise_Operators", ">>", "#Right_shift")}}<br>
{{JSxRef("Operators/Bitwise_Operators", ">>>", "#Unsigned_right_shift")}}</p>
</li>
</ul>
<ul class="card-grid">
<li><span>Binary bitwise operators</span>{{JSxRef("Operators/Bitwise_Operators", "&", "#Bitwise_AND")}}<br>
{{JSxRef("Operators/Bitwise_Operators", "|", "#Bitwise_OR")}}<br>
{{JSxRef("Operators/Bitwise_Operators", "^", "#Bitwise_XOR")}}</li>
<li><span>Binary logical operators</span>
<p>{{JSxRef("Operators/Logical_Operators", "&&", "#Logical_AND")}}<br>
{{JSxRef("Operators/Logical_Operators", "||", "#Logical_OR")}}</p>
</li>
<li><span>Ternary operator</span>
<p>{{JSxRef("Operators/Conditional_Operator", "(condition ? ifTrue : ifFalse)")}}</p>
</li>
<li><span>Assignment operators</span>
<p>{{JSxRef("Operators/Assignment_Operators", "=", "#Assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "*=", "#Multiplication_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "/=", "#Division_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "%=", "#Remainder_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "+=", "#Addition_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "-=", "#Subtraction_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "<<=", "#Left_shift_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", ">>=", "#Right_shift_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", ">>>=", "#Unsigned_right_shift_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "&=", "#Bitwise_AND_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "^=", "#Bitwise_XOR_assignment")}}<br>
{{JSxRef("Operators/Assignment_Operators", "|=", "#Bitwise_OR_assignment")}}<br>
{{JSxRef("Operators/Destructuring_assignment", "[a, b] = [1, 2]")}}<br>
{{JSxRef("Operators/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}</p>
</li>
</ul>
</div>
<h2 id="Funções">Funções</h2>
<p>This chapter documents how to work with <a href="/en-US/docs/Web/JavaScript/Reference/Functions">JavaScript functions</a> to develop your applications.</p>
<ul>
<li><a href="/pt-PT/docs/Web/JavaScript/Reference/Funcoes/arguments"><code>argumentos (arguments)</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Arrow functions</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">Default parameters</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters">Rest parameters</a></li>
</ul>
<h2 id="Páginas_adicionais_de_referência">Páginas adicionais de referência</h2>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Lexical_grammar">Lexical grammar</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Data_structures">Data types and data structures</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features">Deprecated features</a></li>
</ul>
|