e01.org

JavaScript Guide

The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the JavaScript reference.

The JavaScript Guide shows you how to use [JavaScript](/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](/docs/Web/JavaScript/Reference).

This Guide is divided into the following chapters.

## Introduction

Overview: [Introduction](/docs/Web/JavaScript/Guide/Introduction)

- [About this guide](/docs/Web/JavaScript/Guide/Introduction#where_to_find_javascript_information)
- [About JavaScript](/docs/Web/JavaScript/Guide/Introduction#what_is_javascript)
- [JavaScript and Java](/docs/Web/JavaScript/Guide/Introduction#javascript_and_java)
- [ECMAScript](/docs/Web/JavaScript/Guide/Introduction#javascript_and_the_ecmascript_specification)
- [Tools](/docs/Web/JavaScript/Guide/Introduction#getting_started_with_javascript)
- [What's next](/docs/Web/JavaScript/Guide/Introduction#whats_next)

## Grammar and types

Overview: [Grammar and types](/docs/Web/JavaScript/Guide/Grammar_and_types)

- [Basic syntax & comments](/docs/Web/JavaScript/Guide/Grammar_and_types#basics)
- [Declarations](/docs/Web/JavaScript/Guide/Grammar_and_types#declarations)
- [Variable scope](/docs/Web/JavaScript/Guide/Grammar_and_types#variable_scope)
- [Variable hoisting](/docs/Web/JavaScript/Guide/Grammar_and_types#variable_hoisting)
- [Data structures and types](/docs/Web/JavaScript/Guide/Grammar_and_types#data_structures_and_types)
- [Literals](/docs/Web/JavaScript/Guide/Grammar_and_types#literals)

## Control flow and error handling

Overview: [Control flow and error handling](/docs/Web/JavaScript/Guide/Control_flow_and_error_handling)

- [`if...else`](/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#if...else_statement)
- [`switch`](/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#switch_statement)
- [`try`/`catch`/`throw`](/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#exception_handling_statements)
- [Error objects](/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#utilizing_error_objects)

## Loops and iteration

Overview: [Loops and iteration](/docs/Web/JavaScript/Guide/Loops_and_iteration)

- [`for`](/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement)
- [`while`](/docs/Web/JavaScript/Guide/Loops_and_iteration#while_statement)
- [`do...while`](/docs/Web/JavaScript/Guide/Loops_and_iteration#do...while_statement)
- [`continue`](/docs/Web/JavaScript/Guide/Loops_and_iteration#continue_statement)
- [`break`](/docs/Web/JavaScript/Guide/Loops_and_iteration#break_statement)
- [`for...in`](/docs/Web/JavaScript/Guide/Loops_and_iteration#for...in_statement)
- [`for...of`](/docs/Web/JavaScript/Guide/Loops_and_iteration#for...of_statement)

## Functions

Overview: [Functions](/docs/Web/JavaScript/Guide/Functions)

- [Defining functions](/docs/Web/JavaScript/Guide/Functions#defining_functions)
- [Calling functions](/docs/Web/JavaScript/Guide/Functions#calling_functions)
- [Function scopes and closures](/docs/Web/JavaScript/Guide/Functions#function_scopes_and_closures)
- [Arguments](/docs/Web/JavaScript/Guide/Functions#using_the_arguments_object) & [parameters](/docs/Web/JavaScript/Guide/Functions#function_parameters)
- [Arrow functions](/docs/Web/JavaScript/Guide/Functions#arrow_functions)

## Expressions and operators

Overview: [Expressions and operators](/docs/Web/JavaScript/Guide/Expressions_and_operators)

- [Assignment](/docs/Web/JavaScript/Guide/Expressions_and_operators#assignment_operators) & [Comparisons](/docs/Web/JavaScript/Guide/Expressions_and_operators#comparison_operators)
- [Arithmetic operators](/docs/Web/JavaScript/Guide/Expressions_and_operators#arithmetic_operators)
- [Bitwise](/docs/Web/JavaScript/Guide/Expressions_and_operators#bitwise_operators) & [logical operators](/docs/Web/JavaScript/Guide/Expressions_and_operators#logical_operators)
- [Conditional (ternary) operator](/docs/Web/JavaScript/Guide/Expressions_and_operators#conditional_ternary_operator)

## Numbers and strings

Overview: [Numbers and strings](/docs/Web/JavaScript/Guide/Numbers_and_strings)

- [Numbers](/docs/Web/JavaScript/Guide/Numbers_and_strings#numbers)
- [`Number` object](/docs/Web/JavaScript/Guide/Numbers_and_strings#number_object)
- [`Math` object](/docs/Web/JavaScript/Guide/Numbers_and_strings#math_object)
- [Strings](/docs/Web/JavaScript/Guide/Numbers_and_strings#strings)
- [`String` object](/docs/Web/JavaScript/Guide/Numbers_and_strings#string_object)
- [Template literals](/docs/Web/JavaScript/Guide/Numbers_and_strings#template_literals)

## Representing dates & times

Overview: [Representing dates & times](/docs/Web/JavaScript/Guide/Representing_dates_times)

- [Instants](/docs/Web/JavaScript/Guide/Representing_dates_times#instants)
- [Zoned date-times](/docs/Web/JavaScript/Guide/Representing_dates_times#zoned_date-times)
- [Plain date-times, dates, and times](/docs/Web/JavaScript/Guide/Representing_dates_times#plain_date-times_dates_and_times)
- [Plain year-months and month-days](/docs/Web/JavaScript/Guide/Representing_dates_times#plain_year-months_and_month-days)
- [Cookbook](/docs/Web/JavaScript/Guide/Representing_dates_times/Cookbook)

## Regular expressions

Overview: [Regular expressions](/docs/Web/JavaScript/Guide/Regular_expressions)

- [Creating a regular expression](/docs/Web/JavaScript/Guide/Regular_expressions#creating_a_regular_expression)
- [Writing a regular expression pattern](/docs/Web/JavaScript/Guide/Regular_expressions#writing_a_regular_expression_pattern)
- [Assertions](/docs/Web/JavaScript/Guide/Regular_expressions/Assertions)
- [Character classes](/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes)
- [Groups and backreferences](/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences)
- [Quantifiers](/docs/Web/JavaScript/Guide/Regular_expressions/Quantifiers)

## Indexed collections

Overview: [Indexed collections](/docs/Web/JavaScript/Guide/Indexed_collections)

## Keyed collections

Overview: [Keyed collections](/docs/Web/JavaScript/Guide/Keyed_collections)

- [`Map`](/docs/Web/JavaScript/Guide/Keyed_collections#map_object)
- [`WeakMap`](/docs/Web/JavaScript/Guide/Keyed_collections#weakmap_object)
- [`Set`](/docs/Web/JavaScript/Guide/Keyed_collections#set_object)
- [`WeakSet`](/docs/Web/JavaScript/Guide/Keyed_collections#weakset_object)

## Working with objects

Overview: [Working with objects](/docs/Web/JavaScript/Guide/Working_with_objects)

- [Objects and properties](/docs/Web/JavaScript/Guide/Working_with_objects#objects_and_properties)
- [Creating objects](/docs/Web/JavaScript/Guide/Working_with_objects#creating_new_objects)
- [Defining methods](/docs/Web/JavaScript/Guide/Working_with_objects#defining_methods)
- [Getter and setter](/docs/Web/JavaScript/Guide/Working_with_objects#defining_getters_and_setters)

## Using classes

Overview: [Using classes](/docs/Web/JavaScript/Guide/Using_classes)

- [Declaring a class](/docs/Web/JavaScript/Guide/Using_classes#declaring_a_class)
- [Various class features](/docs/Web/JavaScript/Guide/Using_classes#constructor)
- [Extends and inheritance](/docs/Web/JavaScript/Guide/Using_classes#extends_and_inheritance)
- [Why classes?](/docs/Web/JavaScript/Guide/Using_classes#why_classes)

## Promises

Overview: [Promises](/docs/Web/JavaScript/Guide/Using_promises)

- [Guarantees](/docs/Web/JavaScript/Guide/Using_promises#guarantees)
- [Chaining](/docs/Web/JavaScript/Guide/Using_promises#chaining)
- [Error handling](/docs/Web/JavaScript/Guide/Using_promises#error_handling)
- [Composition](/docs/Web/JavaScript/Guide/Using_promises#composition)
- [Timing](/docs/Web/JavaScript/Guide/Using_promises#timing)

## Typed arrays

Overview: [Typed arrays](/docs/Web/JavaScript/Guide/Typed_arrays)

## Iterators and generators

Overview: [Iterators and generators](/docs/Web/JavaScript/Guide/Iterators_and_generators)

- [Iterators](/docs/Web/JavaScript/Guide/Iterators_and_generators#iterators)
- [Iterables](/docs/Web/JavaScript/Guide/Iterators_and_generators#iterables)
- [Generators](/docs/Web/JavaScript/Guide/Iterators_and_generators#generator_functions)

## Resource management

Overview: [JavaScript resource management](/docs/Web/JavaScript/Guide/Resource_management)

- [The `using` and `await using` declarations](/docs/Web/JavaScript/Guide/Resource_management#the_using_and_await_using_declarations)
- [The `DisposableStack` and `AsyncDisposableStack` objects](/docs/Web/JavaScript/Guide/Resource_management#the_disposablestack_and_asyncdisposablestack_objects)
- [Error handling](/docs/Web/JavaScript/Guide/Resource_management#error_handling)

## Internationalization

Overview: [Internationalization](/docs/Web/JavaScript/Guide/Internationalization)

- [Date and time formatting](/docs/Web/JavaScript/Guide/Internationalization#date_and_time_formatting)
- [Number formatting](/docs/Web/JavaScript/Guide/Internationalization#number_formatting)
- [Collation](/docs/Web/JavaScript/Guide/Internationalization#collation)

## JavaScript modules

Overview: [JavaScript modules](/docs/Web/JavaScript/Guide/Modules)

- [Exporting](/docs/Web/JavaScript/Guide/Modules#named_exports)
- [Importing](/docs/Web/JavaScript/Guide/Modules#named_imports)
- [Default exports and imports](/docs/Web/JavaScript/Guide/Modules#default_exports_and_imports)
- [Avoiding naming conflicts](/docs/Web/JavaScript/Guide/Modules#avoiding_naming_conflicts)
- [Importing JSON modules](/docs/Web/JavaScript/Guide/Modules#importing_json_modules)
- [Dynamic module loading](/docs/Web/JavaScript/Guide/Modules#dynamic_module_loading)
- [Top-level await](/docs/Web/JavaScript/Guide/Modules#top-level_await)
- [Module metadata](/docs/Web/JavaScript/Guide/Modules#module_metadata)
- [Using modules on the web](/docs/Web/JavaScript/Guide/Modules/Modules_on_the_web)
- [Understanding the module graph](/docs/Web/JavaScript/Guide/Modules/Module_graph)
- [Modules across platforms](/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](/docs/Web/JavaScript/Guide/Language_overview)
- [Data structures](/docs/Web/JavaScript/Guide/Data_structures)
- [Enumerability and ownership of properties](/docs/Web/JavaScript/Guide/Enumerability_and_ownership_of_properties)
- [Inheritance and the prototype chain](/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain)
- [Equality comparisons and sameness](/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness)
- [Closures](/docs/Web/JavaScript/Guide/Closures)
- [Meta programming](/docs/Web/JavaScript/Guide/Meta_programming)
- [Memory management](/docs/Web/JavaScript/Guide/Memory_management)
- [Agent communication and coordination](/docs/Web/JavaScript/Guide/Agent_communication_and_coordination)

Web/JavaScript/Guide/Introduction

source: MDN Web Docs mirror · page

Cite this

"JavaScript Guide". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·