# exit\_loop

The `exit_loop` statement will terminate the current loop.

{% hint style="info" %}
Either `exit_loop` or `loop_exit` may be used. Both variants work identically.
{% endhint %}

## Syntax

`exit_loop`

## Details

The `exit_loop` statement will immediately terminate the current loop and script execution will jump to the statement following the `}` at the end of the current loop.

This can be done even if the `exit_loop` statement is within one or more [if](https://olddocs.exivity.io/3.5.4/data-pipelines/extract/language/if) constructs inside the loop.

If no loop is in effect then an error will be logged and the script will terminate.
