# Conditional expressions and null coalescing

## Learning objective
- Write valid and readable conditional expressions in Lucia.

## Key syntax
```lucia
let level: string = if (score >= 70) ? "high" : "low";
let alias: string = providedName ?? "guest";
```

## Key rules
- Lucia ternary starts with `if (condition) ? a : b`.
- `??` returns the right side when the left side is `null`.
- In complex expressions, use parentheses for clarity.

## Common mistakes
- Writing C-style ternary without the leading `if`.
- Mixing ternary and logical operators without grouping.

## Suggested practice
- Rewrite an `if/else` chain as a ternary using leading `if`.

## Related
- operators-and-expressions
- syntax-control-flow
- diagnostics
