# The Code You Need

A quick review of exactly the code this course uses, in all five languages. Learners who know it can take the chapter check first and skip ahead.

Updated: November 17, 2026

## [Loops, Methods and Lists](https://www.ask-codey.com/courses/data-structures/topics/ds-loops-methods-and-lists)

1. [Loops and Methods, Five Ways](https://www.ask-codey.com/lessons/ds-code-you-need-loops-and-methods) (Novice): A quick review of the loops and methods this course uses, in all five languages, with a snack stand as the example: a for loop, a while loop, a for-each loop, and a method that takes values and returns one.
2. [Arrays and Lists](https://www.ask-codey.com/lessons/ds-code-you-need-arrays-and-lists) (Novice): A review of the two ways each language keeps items in a row: a fixed-size array and a list that grows, reading and changing an item by its index, and when to use each.

## [Objects](https://www.ask-codey.com/courses/data-structures/topics/ds-objects)

1. [Classes and Objects](https://www.ask-codey.com/lessons/ds-code-you-need-classes) (Apprentice): A review of classes and objects in all five languages: a Snack class with fields, a constructor and methods, objects made from it, and the classic shape of a Java program you'll see in textbooks.
2. [Generics: a Box for Any Type](https://www.ask-codey.com/lessons/ds-code-you-need-generics) (Apprentice): How C#, Java and TypeScript write one class that works for any type of item, read aloud as "a list of snacks", and why Python and JavaScript don't need the label.
3. [References: Two Names, One Object](https://www.ask-codey.com/lessons/ds-code-you-need-references) (Apprentice): Why copying a variable that holds an object copies only the note that says where it is, so two names can change one object; how to make a real copy; and null, None and undefined, the note that points at nothing.

## [Exercise: The Snack Inventory](https://www.ask-codey.com/courses/data-structures/topics/exercise-ds-snack-inventory)

1. [Exercise: The Snack Inventory](https://www.ask-codey.com/lessons/exercise-ds-snack-inventory) (Apprentice): Finish a snack stand's inventory code in your language: a Snack class's value method, then find a snack by name, add up the stock's value, and list what's running low, using loops, lists, classes and references.

Source: https://www.ask-codey.com/courses/data-structures/chapters/ds-code-you-need
