> For the complete documentation index, see [llms.txt](https://program.hackyourfuture.dk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://program.hackyourfuture.dk/course-content/foundation/intro-to-javascript.md).

# Intro to JavaScript

Here you can find course content and the assignments for the Intro to JavaScript module.

| Week | Topic                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Preparation                                                                        | Assignment                                                                       | Session Plan                                                                         |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| 1.   | Intro JavaScript (What is it, what can you use it for); Setup js either via browser or via node; [Variables: var, let, const](/course-content/foundation/intro-to-javascript/week1.md#variables); Console.log; [Types](/course-content/foundation/intro-to-javascript/week1.md#Types): [String](/course-content/foundation/intro-to-javascript/week1.md#String), [number](/course-content/foundation/intro-to-javascript/week1.md#Number), boolean, [null, undefined](/course-content/foundation/intro-to-javascript/week1.md#Null--undefined), [array](/course-content/foundation/intro-to-javascript/week1.md#Array); [Operators](/course-content/foundation/intro-to-javascript/week1.md#comparison-operators) | [Preparation](/course-content/foundation/intro-to-javascript/week1/preparation.md) | [Assignment](/course-content/foundation/intro-to-javascript/week1/assignment.md) | [Session Plan](/course-content/foundation/intro-to-javascript/week1/session-plan.md) |
| 2.   | Conditions; [Functions](/course-content/foundation/intro-to-javascript/week2.md#Functions); Global vs local scope; For loop                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | [Preparation](/course-content/foundation/intro-to-javascript/week2/preparation.md) | [Assignment](/course-content/foundation/intro-to-javascript/week2/assignment.md) | [Session Plan](/course-content/foundation/intro-to-javascript/week2/session-plan.md) |
| 3.   | Arrays (continued); [Objects](/course-content/foundation/intro-to-javascript/week3.md#Objects); [Call stack](/course-content/foundation/intro-to-javascript/week3.md#Call-stack)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [Preparation](/course-content/foundation/intro-to-javascript/week3/preparation.md) | [Assignment](/course-content/foundation/intro-to-javascript/week3/assignment.md) | [Session Plan](/course-content/foundation/intro-to-javascript/week3/session-plan.md) |
| 4.   | Recap of js basics; Solving problems                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [Preparation](/course-content/foundation/intro-to-javascript/week4/preparation.md) | [Assignment](/course-content/foundation/intro-to-javascript/week4/assignment.md) | [Session Plan](/course-content/foundation/intro-to-javascript/week4/session-plan.md) |

> **Kind note:** The JavaScript modules are tough. Very tough! We expect you to **always** come prepared to the session on Sunday.

## Learning goals

* [ ] Understand what JavaScript is and what it's used for
* [ ] Use basic programming concepts such as variable definitions, types and operators
* [ ] Practice reading and fixing errors
* [ ] Use conditional logic to implement more advanced functionality
* [ ] Write basic functions with parameters and arguments
* [ ] Understand global vs local scope
* [ ] Using objects and arrays to store, access and manipulate more complex data


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://program.hackyourfuture.dk/course-content/foundation/intro-to-javascript.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
