Skip to content
Make room for learningYour learning studio
Choose a value with if4 min

Loading your session…

A small idea, worth understanding

Choose a value with if

Use a boolean condition in a Zig if expression.

Zig if conditions are boolean. An if expression can select between compatible values.

Comparison operators produce booleans suitable for the condition.

Two activities. No typing needed. You can always retry, or read an explanation and continue.

Read the full lesson first