# Setup and first example — Swift

Source: https://www.geekswithgeeks.com/en/swift/swift-02

> Understand Setup and first example as a useful part of Swift.

## The essential idea

**Setup and first example** gives you one practical part of Swift. Start by naming the input, the change, and the expected result. This mental model matters before any syntax rule.

## Run a tiny experiment

Use a minimal example. Predict what changes, run it, then explain the observed result.

```text
// Explore Setup and first example with one focused example.
value = 0
print(value)
```

Output:

```
0
```

## Avoid this trap

Do not memorize **Setup and first example** in isolation. Change one value in a small example and use feedback to correct your understanding.

Quick check

**Quiz:** What is a good first practice for Setup and first example?

- [x] Run one small focused example.
- [ ] Memorize without testing.
- [ ] Ignore feedback.

*Answer:* Run one small focused example.. Small experiments reveal cause and effect.
