---
title: JavaScript Guide
slug: Web/JavaScript/Guide
tags:
  - Guide
  - JavaScript
  - l10n:priority
---
{{jsSidebar("JavaScript Guide")}}

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)
- [Hello World](/en-US/docs/Web/JavaScript/Guide/Introduction#hello_world)

## 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 scope](/en-US/docs/Web/JavaScript/Guide/Functions#function_scope)
- [Closures](/en-US/docs/Web/JavaScript/Guide/Functions#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 dates

Overview: [Numbers and dates](/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates)

- [Number literals](/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#numbers)
- [`Number` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#number_object)
- [`Math` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#math_object)
- [`Date` object](/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#date_object)

## Text formatting

Overview: [Text formatting](/en-US/docs/Web/JavaScript/Guide/Text_formatting)

- [String literals](/en-US/docs/Web/JavaScript/Guide/Text_formatting#string_literals)
- [`String` object](/en-US/docs/Web/JavaScript/Guide/Text_formatting#string_objects)
- [Template literals](/en-US/docs/Web/JavaScript/Guide/Text_formatting#multi-line_template_literals)
- [Internationalization](/en-US/docs/Web/JavaScript/Guide/Text_formatting#internationalization)
- [Regular Expressions](/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)

## Indexed collections

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

- [Arrays](/en-US/docs/Web/JavaScript/Guide/Indexed_collections#array_object)
- [Typed arrays](/en-US/docs/Web/JavaScript/Guide/Indexed_collections#typed_arrays)

## 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)

## Details of the object model

Overview: [Details of the object model](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model)

- [Prototype-based OOP](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages)
- [Creating object hierarchies](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#creating_the_hierarchy)
- [Inheritance](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#property_inheritance_revisited)

## 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 propagation](/en-US/docs/Web/JavaScript/Guide/Using_promises#error_propagation)
- [Composition](/en-US/docs/Web/JavaScript/Guide/Using_promises#composition)
- [Timing](/en-US/docs/Web/JavaScript/Guide/Using_promises#timing)

## 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#generators)

## Meta programming

Overview: [Meta programming](/en-US/docs/Web/JavaScript/Guide/Meta_programming)

- [`Proxy`](/en-US/docs/Web/JavaScript/Guide/Meta_programming#proxies)
- [Handlers and traps](/en-US/docs/Web/JavaScript/Guide/Meta_programming#handlers_and_traps)
- [Revocable Proxy](/en-US/docs/Web/JavaScript/Guide/Meta_programming#revocable_proxy)
- [`Reflect`](/en-US/docs/Web/JavaScript/Guide/Meta_programming#reflection)

## JavaScript modules

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

- [Exporting](/en-US/docs/Web/JavaScript/Guide/Modules#exporting_module_features)
- [Importing](/en-US/docs/Web/JavaScript/Guide/Modules#importing_features_into_your_script)
- [Default exports](/en-US/docs/Web/JavaScript/Guide/Modules#default_exports_versus_named_exports)
- [Renaming features](/en-US/docs/Web/JavaScript/Guide/Modules#renaming_imports_and_exports)
- [Aggregating modules](/en-US/docs/Web/JavaScript/Guide/Modules#aggregating_modules)
- [Dynamic module loading](/en-US/docs/Web/JavaScript/Guide/Modules#dynamic_module_loading)

{{Next("Web/JavaScript/Guide/Introduction")}}
