# Loops and Methods, Five Ways

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.

![Cheat sheet: Loops and Methods, Five Ways](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/aefc6e39400e4f029c693f71f31fd04b.webp)

- Category: Data Structures
- Level: Novice
- Tags: c-sharp, java, JavaScript, Loop (software-development), Method (oop), Parameter (software-development), python, typescript
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-code-you-need-loops-and-methods-cheat-sheet
