# Lesson 2: Functions and arrow functions In this lesson you'll work through functions and arrow functions step by step, with short exercises after each idea. Read the full lesson: [https://glibcode.net/courses/javascript-web/lessons/2](https://glibcode.net/courses/javascript-web/lessons/2) ## Files - `functions.js`: function declarations and arrow functions > **Tip:** Optional chaining saves a lot of `if`s: `user?.address?.city`. > **Tip:** The browser's Network tab shows every `fetch` with its status and response. ## Run it ```sh node functions.js ``` ## Exercises See [exercises.md](exercises.md). Ask in the forum once you've tried.