# Zig Level 1: Zig Foundations

> Level 1: Zig Foundations of the LoWisa Zig course: Types and Values, Control Flow, Functions. 3 lessons and 9 ideas, each explained in one line.

Zig Foundations is level 1 of 11 of the [LoWisa Zig course](/courses/zig/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Types and Values

- **Explicit integers.** Zig integers say their width: **u8**, i32, u64: and arbitrary widths like u7 when hardware asks.
- **const and var.** **const** binds immutably, var mutably: immutability the visible default.
- **No implicit coercions.** Numeric conversions are **explicit**: @intCast and friends, every narrowing a visible decision.

## Control Flow

- **if and switch.** Zig branches with if and **switch**: switch exhaustive over enums, checked by the compiler.
- **Loops.** **while** and for iterate: for walking slices with index and value, no hidden iterators.
- **defer.** **defer** schedules cleanup at scope exit: release written beside acquire, run in reverse order.

## Functions

- **Functions.** A **fn** declares typed parameters and return: pub exporting it beyond the file.
- **Error unions in signatures.** A return like **!u32** means error-or-value: fallibility part of the type.
- **No variadics magic.** Zig passes **tuples** and comptime where others use variadics: printing included, checked at compile time.

## Before and after this level

- **Before:** [Start Here: Explicit Systems Programming](/courses/zig/start-here/): Zig's Design Philosophy, Native Compilation.
- **Next:** [Level 2: Pointers & Memory](/courses/zig/level-2-pointers-and-memory/): Pointers, Slices, Memory Representation.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does Zig Level 1: Zig Foundations cover?

Types and Values, Control Flow, Functions: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Start Here: Explicit Systems Programming, which covers Zig's Design Philosophy, Native Compilation.

## Learn Zig on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/zig/level-1-zig-foundations/ · Updated 2026-11-25
