blob: 5bd35b465994dbadca132cd57897e219df2b6a3f (
plain)
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
|
---
title: Guia de JavaScript
slug: Web/JavaScript/Guide
tags:
- Guide
- JavaScript
- NeedsTranslation
- TopicStub
translation_of: Web/JavaScript/Guide
---
<div>{{jsSidebar("JavaScript Guide")}}</div>
<p class="summary">La Guia de JavaScript mostra com utilitzar <a href="/ca/docs/Web/JavaScript">JavaScript</a> a l'hora que proporciona una visió general del llenguatge. Per a començar amb JavaScript o a programar en general podeu consultar els article de l'<a href="/ca/Learn">zona d'aprenentatge</a>. Per a informació exhaustiva sobre qualsevol característica del llenguatge podeu consultar la<a href="/ca/docs/Web/JavaScript/Referencia"> referència de JavaScript</a>.</p>
<h2 id="Capítols">Capítols</h2>
<p>Aquesta guia es divideix en diversos capítols:</p>
<ul class="card-grid">
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Introducció">Introducció</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Introducció#Where_to_find_JavaScript_information">Quant a aquesta guia</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Introducció#What_is_JavaScript.3F">Quant a JavaScript</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Introducció#JavaScript_and_Java">JavaScript i Java</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Introducció#JavaScript_and_the_ECMAScript_Specification">ECMAScript</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Introducció#Getting_started_with_JavaScript">Eines</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Introducció#Hello_world">Hola Món</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types">Gramàtica i tipus</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Basics">Sintaxi bàsica i comentaris</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Declarations">Declaracions</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Variable_scope">Àmbit de variables</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Variable_hoisting">Hoisting de variables</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Data_structures_and_types">Estructures de dades i tipus</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Grammar_and_types#Literals">Literals</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling">Control de fluxe i manegament d'errors</a></span>
<p><code><a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#if...else_statement">if...else</a></code><br>
<code><a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#switch_statement">switch</a></code><br>
<a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#Exception_handling_statements"><code>try</code>/<code>catch</code>/<code>throw</code></a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#Utilizing_Error_objects">Objecte Error</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#Promises">Objecte Promise</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration">Bucles i iteració</a></span>
<p><code><a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement">for</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#while_statement">while</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#do...while_statement">do...while</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#break_statement">break</a>/<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#continue_statement">continue</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#for...in_statement">for..in</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Loops_and_iteration#for...of_statement">for..of</a></code></p>
</li>
</ul>
<ul class="card-grid">
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Functions">Funcions</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Functions#Defining_functions">Definir funcions</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Functions#Calling_functions">Cridar funcions</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Functions#Function_scope">Àmbit de funcions</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Functions#Closures">Closures</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Functions#Using_the_arguments_object">Arguments</a> i <a href="/ca/docs/Web/JavaScript/Guide/Functions#Function_parameters">paràmeters</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Functions#Arrow_functions">Functions fletxa</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors">Expressions i Operadors</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Assignment_operators">Assignaments</a> i <a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Comparison_operators">Comparacions</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Arithmetic_operators">Operadors aritmètics</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Bitwise_operators">Operadors de bits</a> i <a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Logical_operators">operadors lògics</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Expressions_i_Operadors#Conditional_(ternary)_operator">Operador condicional (ternari)</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Numbers_and_dates">Nombres i dates</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Numbers_and_dates#Numbers">Literals de nombres</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Numbers_and_dates#Number_object">Objecte <code>Number</code></a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Numbers_and_dates#Math_object">Objecte <code>Math</code></a><br>
<a href="https://developer.mozilla.org/ca/docs/Web/JavaScript/Guide/Numbers_and_dates#Date_object">Objecte <code>Date</code></a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Text_formatting">Formateig de text</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Text_formatting#String_literals">Literals String</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Text_formatting#String_objects"><code>String</code> object</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Text_formatting#Multi-line_template_strings">Strings plantilla</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Text_formatting#Internationalization">Internacionalització</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Regular_Expressions">Expressions regulars</a></p>
</li>
</ul>
<ul class="card-grid">
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Indexed_collections">Col·leccions indexades</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Indexed_collections#Array_object">Arrays</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Indexed_collections#Array_comprehensions">Comprensions per a Arrays</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Indexed_collections#Typed_Arrays">Arrays amb tipus</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Keyed_collections">Col·leccions clau-valor</a></span>
<p><code><a href="/ca/docs/Web/JavaScript/Guide/Keyed_collections#Map_object">Map</a></code><br>
<code><a href="/ca/docs/Web/JavaScript/Guide/Keyed_collections#WeakMap_object">WeakMap</a></code><br>
<code><a href="/ca/docs/Web/JavaScript/Guide/Keyed_collections#Set_object">Set</a></code><br>
<code><a href="/ca/docs/Web/JavaScript/Guide/Keyed_collections#WeakSet_object">WeakSet</a></code></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Treballar_amb_Objectes">Treballar amb Objectes</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Treballar_amb_Objectes#Objects_and_properties">Objectes i propietats</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Treballar_amb_Objectes#Creating_new_objects">Crear objectes</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Treballar_amb_Objectes#Defining_methods">Definir mètodes</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Treballar_amb_Objectes#Defining_getters_and_setters">Getters i setters</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Details_of_the_Object_Model">Detalls del model d'objectes</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#Class-based_vs._prototype-based_languages">Programació Orientada a Objectes basada en Prototipus</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#Creating_the_hierarchy">Crear jerarquies d'objectes</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#Property_inheritance_revisited">Herència</a></p>
</li>
</ul>
<ul class="card-grid">
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Iterators_and_Generators">Iteradors i generadors</a></span>
<p><a href="/ca/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterators">Iteradors</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables">Iterables</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Iterators_and_Generators#Generators">Generdors</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Iterators_and_Generators#Generator_comprehensions">Comprensions per a Generadors</a></p>
</li>
<li><span><a href="/ca/docs/Web/JavaScript/Guide/Meta_programming">Meta programació</a></span>
<p><code><a href="/ca/docs/Web/JavaScript/Guide/Meta_programming#Proxies">Proxy</a></code><br>
<a href="/ca/docs/Web/JavaScript/Guide/Meta_programming#Handlers_and_traps">Manegadors i trampes</a><br>
<a href="/ca/docs/Web/JavaScript/Guide/Meta_programming#Revocable_Proxy">Proxy Revocable</a><br>
<code><a href="/ca/docs/Web/JavaScript/Guide/Meta_programming#Reflection">Reflect</a></code></p>
</li>
</ul>
<p>{{Next("Web/JavaScript/Guide/Introduction")}}</p>
|