Repository navigation
Expand file tree
/
Copy pathindex.md
More file actions
205 lines (144 loc) · 11.5 KB
/
Copy pathindex.md
File metadata and controls
205 lines (144 loc) · 11.5 KB
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
---
title: JavaScript Guide
slug: Web/JavaScript/Guide
page-type: guide
sidebar: jssidebar
---
The JavaScript Guide shows you how to use [JavaScript](/en-US/docs/Web/JavaScript) and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference).
This Guide is divided into the following chapters.
## Introduction
Overview: [Introduction](/en-US/docs/Web/JavaScript/Guide/Introduction)
- [About this guide](/en-US/docs/Web/JavaScript/Guide/Introduction#where_to_find_javascript_information)
- [About JavaScript](/en-US/docs/Web/JavaScript/Guide/Introduction#what_is_javascript)
- [JavaScript and Java](/en-US/docs/Web/JavaScript/Guide/Introduction#javascript_and_java)
- [ECMAScript](/en-US/docs/Web/JavaScript/Guide/Introduction#javascript_and_the_ecmascript_specification)
- [Tools](/en-US/docs/Web/JavaScript/Guide/Introduction#getting_started_with_javascript)
- [What's next](/en-US/docs/Web/JavaScript/Guide/Introduction#whats_next)
## Grammar and types
Overview: [Grammar and types](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types)
- [Basic syntax & comments](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#basics)
- [Declarations](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#declarations)
- [Variable scope](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#variable_scope)
- [Variable hoisting](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#variable_hoisting)
- [Data structures and types](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#data_structures_and_types)
- [Literals](/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#literals)
## Control flow and error handling
Overview: [Control flow and error handling](/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling)
- [`if...else`](/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#if...else_statement)
- [`switch`](/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#switch_statement)
- [`try`/`catch`/`throw`](/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#exception_handling_statements)
- [Error objects](/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#utilizing_error_objects)
## Loops and iteration
Overview: [Loops and iteration](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration)
- [`for`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement)
- [`while`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#while_statement)
- [`do...while`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#do...while_statement)
- [`continue`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#continue_statement)
- [`break`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#break_statement)
- [`for...in`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for...in_statement)
- [`for...of`](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for...of_statement)
## Functions
Overview: [Functions](/en-US/docs/Web/JavaScript/Guide/Functions)
- [Defining functions](/en-US/docs/Web/JavaScript/Guide/Functions#defining_functions)
- [Calling functions](/en-US/docs/Web/JavaScript/Guide/Functions#calling_functions)
- [Function scopes and closures](/en-US/docs/Web/JavaScript/Guide/Functions#function_scopes_and_closures)
- [Arguments](/en-US/docs/Web/JavaScript/Guide/Functions#using_the_arguments_object) & [parameters](/en-US/docs/Web/JavaScript/Guide/Functions#function_parameters)
- [Arrow functions](/en-US/docs/Web/JavaScript/Guide/Functions#arrow_functions)
## Expressions and operators
Overview: [Expressions and operators](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators)
- [Assignment](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#assignment_operators) & [Comparisons](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#comparison_operators)
- [Arithmetic operators](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#arithmetic_operators)
- [Bitwise](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#bitwise_operators) & [logical operators](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#logical_operators)
- [Conditional (ternary) operator](/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators#conditional_ternary_operator)
## Numbers and strings
Overview: [Numbers and strings](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings)
- [Numbers](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#numbers)
- [`Number` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#number_object)
- [`Math` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#math_object)
- [Strings](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#strings)
- [`String` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#string_object)
- [Template literals](/en-US/docs/Web/JavaScript/Guide/Numbers_and_strings#template_literals)
## Representing dates & times
Overview: [Representing dates & times](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times)
- [Instants](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times#instants)
- [Zoned date-times](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times#zoned_date-times)
- [Plain date-times, dates, and times](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times#plain_date-times_dates_and_times)
- [Plain year-months and month-days](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times#plain_year-months_and_month-days)
- [Cookbook](/en-US/docs/Web/JavaScript/Guide/Representing_dates_times/Cookbook)
## Regular expressions
Overview: [Regular expressions](/en-US/docs/Web/JavaScript/Guide/Regular_expressions)
- [Creating a regular expression](/en-US/docs/Web/JavaScript/Guide/Regular_expressions#creating_a_regular_expression)
- [Writing a regular expression pattern](/en-US/docs/Web/JavaScript/Guide/Regular_expressions#writing_a_regular_expression_pattern)
- [Assertions](/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Assertions)
- [Character classes](/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes)
- [Groups and backreferences](/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences)
- [Quantifiers](/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Quantifiers)
## Indexed collections
Overview: [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections)
## Keyed collections
Overview: [Keyed collections](/en-US/docs/Web/JavaScript/Guide/Keyed_collections)
- [`Map`](/en-US/docs/Web/JavaScript/Guide/Keyed_collections#map_object)
- [`WeakMap`](/en-US/docs/Web/JavaScript/Guide/Keyed_collections#weakmap_object)
- [`Set`](/en-US/docs/Web/JavaScript/Guide/Keyed_collections#set_object)
- [`WeakSet`](/en-US/docs/Web/JavaScript/Guide/Keyed_collections#weakset_object)
## Working with objects
Overview: [Working with objects](/en-US/docs/Web/JavaScript/Guide/Working_with_objects)
- [Objects and properties](/en-US/docs/Web/JavaScript/Guide/Working_with_objects#objects_and_properties)
- [Creating objects](/en-US/docs/Web/JavaScript/Guide/Working_with_objects#creating_new_objects)
- [Defining methods](/en-US/docs/Web/JavaScript/Guide/Working_with_objects#defining_methods)
- [Getter and setter](/en-US/docs/Web/JavaScript/Guide/Working_with_objects#defining_getters_and_setters)
## Using classes
Overview: [Using classes](/en-US/docs/Web/JavaScript/Guide/Using_classes)
- [Declaring a class](/en-US/docs/Web/JavaScript/Guide/Using_classes#declaring_a_class)
- [Various class features](/en-US/docs/Web/JavaScript/Guide/Using_classes#constructor)
- [Extends and inheritance](/en-US/docs/Web/JavaScript/Guide/Using_classes#extends_and_inheritance)
- [Why classes?](/en-US/docs/Web/JavaScript/Guide/Using_classes#why_classes)
## Promises
Overview: [Promises](/en-US/docs/Web/JavaScript/Guide/Using_promises)
- [Guarantees](/en-US/docs/Web/JavaScript/Guide/Using_promises#guarantees)
- [Chaining](/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
- [Error handling](/en-US/docs/Web/JavaScript/Guide/Using_promises#error_handling)
- [Composition](/en-US/docs/Web/JavaScript/Guide/Using_promises#composition)
- [Timing](/en-US/docs/Web/JavaScript/Guide/Using_promises#timing)
## Typed arrays
Overview: [Typed arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays)
## Iterators and generators
Overview: [Iterators and generators](/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators)
- [Iterators](/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators#iterators)
- [Iterables](/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators#iterables)
- [Generators](/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators#generator_functions)
## Resource management
Overview: [JavaScript resource management](/en-US/docs/Web/JavaScript/Guide/Resource_management)
- [The `using` and `await using` declarations](/en-US/docs/Web/JavaScript/Guide/Resource_management#the_using_and_await_using_declarations)
- [The `DisposableStack` and `AsyncDisposableStack` objects](/en-US/docs/Web/JavaScript/Guide/Resource_management#the_disposablestack_and_asyncdisposablestack_objects)
- [Error handling](/en-US/docs/Web/JavaScript/Guide/Resource_management#error_handling)
## Internationalization
Overview: [Internationalization](/en-US/docs/Web/JavaScript/Guide/Internationalization)
- [Date and time formatting](/en-US/docs/Web/JavaScript/Guide/Internationalization#date_and_time_formatting)
- [Number formatting](/en-US/docs/Web/JavaScript/Guide/Internationalization#number_formatting)
- [Collation](/en-US/docs/Web/JavaScript/Guide/Internationalization#collation)
## JavaScript modules
Overview: [JavaScript modules](/en-US/docs/Web/JavaScript/Guide/Modules)
- [Exporting](/en-US/docs/Web/JavaScript/Guide/Modules#named_exports)
- [Importing](/en-US/docs/Web/JavaScript/Guide/Modules#named_imports)
- [Default exports and imports](/en-US/docs/Web/JavaScript/Guide/Modules#default_exports_and_imports)
- [Avoiding naming conflicts](/en-US/docs/Web/JavaScript/Guide/Modules#avoiding_naming_conflicts)
- [Importing JSON modules](/en-US/docs/Web/JavaScript/Guide/Modules#importing_json_modules)
- [Dynamic module loading](/en-US/docs/Web/JavaScript/Guide/Modules#dynamic_module_loading)
- [Top-level await](/en-US/docs/Web/JavaScript/Guide/Modules#top-level_await)
- [Module metadata](/en-US/docs/Web/JavaScript/Guide/Modules#module_metadata)
- [Using modules on the web](/en-US/docs/Web/JavaScript/Guide/Modules/Modules_on_the_web)
- [Understanding the module graph](/en-US/docs/Web/JavaScript/Guide/Modules/Module_graph)
- [Modules across platforms](/en-US/docs/Web/JavaScript/Guide/Modules/Modules_across_platforms)
## Advanced topics
After you have learned all fundamental features of JavaScript, you can explore some more niche features, or dive deeper into the language's mechanisms and concepts.
- [Language overview](/en-US/docs/Web/JavaScript/Guide/Language_overview)
- [Data structures](/en-US/docs/Web/JavaScript/Guide/Data_structures)
- [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Guide/Enumerability_and_ownership_of_properties)
- [Inheritance and the prototype chain](/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain)
- [Equality comparisons and sameness](/en-US/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness)
- [Closures](/en-US/docs/Web/JavaScript/Guide/Closures)
- [Meta programming](/en-US/docs/Web/JavaScript/Guide/Meta_programming)
- [Memory management](/en-US/docs/Web/JavaScript/Guide/Memory_management)
- [Agent communication and coordination](/en-US/docs/Web/JavaScript/Guide/Agent_communication_and_coordination)
{{Next("Web/JavaScript/Guide/Introduction")}}