# Use break and continue in Loops

Stop processing once target data is found, or skip irrelevant iterations.

```liquid
{% comment %} GOOD: stop after finding first match {% endcomment %}
{% for product in collection.products %}
  {% if product.tags contains 'featured' %}
    {% assign featured_product = product %}
    {% break %}
  {% endif %}
{% endfor %}

{% comment %} GOOD: skip unavailable items {% endcomment %}
{% for product in collection.products %}
  {% unless product.available %}
    {% continue %}
  {% endunless %}
  <div class="product-card">{{ product.title }}</div>
{% endfor %}
```

`break` avoids iterating the entire collection when you only need one result. `continue` skips rendering for items that don't qualify.
