# Advanced JavaScript

This module is about the JavaScript patterns that power backend systems: transforming data with array methods, handling asynchronous operations with callbacks and Promises, consuming APIs, and modeling domains with classes.

## Contents

| Week | Topic                                                                                                                       | Preparation                                                                                                   | Session Plan                                                                                                                  | Assignment                                                                                                  |
| ---- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| 1.   | [Array Methods](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week1)                         | [Preparation](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week1/preparation) | [Session Plan](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week1/session-plan) (for mentors) | [Assignment](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week1/assignment) |
| 2.   | [Callbacks & Delayed Execution](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week2)         | [Preparation](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week2/preparation) | [Session Plan](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week2/session-plan) (for mentors) | [Assignment](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week2/assignment) |
| 3.   | [Promises & async/await](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week3)                | [Preparation](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week3/preparation) | [Session Plan](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week3/session-plan) (for mentors) | [Assignment](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week3/assignment) |
| 4.   | [Classes & Object-Oriented Programming](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week4) | [Preparation](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week4/preparation) | [Session Plan](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week4/session-plan) (for mentors) | [Assignment](https://program.hackyourfuture.dk/course-content/backend/advanced-javascript/week4/assignment) |

## Module Learning Goals

By the end of this module, you will be able to:

* [ ] Use array methods (`forEach`, `map`, `filter`, `reduce`) to transform, query, and aggregate data
* [ ] Chain array methods into data transformation pipelines
* [ ] Write concise arrow functions with implicit and explicit returns
* [ ] Pass functions as arguments and return functions from functions (higher-order functions)
* [ ] Use callbacks for synchronous and asynchronous operations, including error-first callbacks
* [ ] Explain the difference between synchronous and asynchronous code execution in JavaScript
* [ ] Consume and create Promises using `.then()`, `.catch()`, and `new Promise()`
* [ ] Use `async`/`await` with `try`/`catch` for clean asynchronous code
* [ ] Fetch data from APIs and run parallel requests with `Promise.all()`
* [ ] Declare classes with constructors, methods, and static methods
* [ ] Use inheritance with `extends` and `super()`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://program.hackyourfuture.dk/course-content/backend/advanced-javascript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
