--- url: https://developer.youcan.shop/themes/tags/break.md --- # `break` With `break` you can terminate and exit a loop. ::: info The `break` command can only be placed inside the body of [`for`](./for.md) tag. ::: **Example:** ::: details Data ```json { "products": [ { "slug": "product-1", "price": 76 }, { "slug": "YouCan", "price": 100 }, { "slug": "product-2", "price": 30 }, { "slug": "product-3", "price": 124 }, ] } ``` *Note: Data is only refereed as a reference for this example and is in no means reflecting real world data.* ::: ```liquid {% for product in products %} {% if product.price > 100 %} {% break %} {%- else -%} {{- product.slug -}} | {{- product.price -}} {%- endif -%} {% endfor %} ``` ::: tip Output ```html product-1 | 76 YouCan | 100 product-2 | 30 ``` :::