# Example of Using a Break Activity

> To exemplify how to use the **Break** activity we are going to build upon the project created for [The For Each Activity](https://docs.uipath.com/studio/standalone/latest/user-guide/the-for-each-activity). This new project writes only the first iteration of the loop and a few elements of the array to the **Output** panel.

To exemplify how to use the **Break** activity we are going to build upon the project created for [The For Each Activity](https://docs.uipath.com/studio/standalone/latest/user-guide/the-for-each-activity). This new project writes only the first iteration of the loop and a few elements of the array to the **Output** panel.

1. In the **Body** of the **For Each** activity, under the [Write Line](https://docs.uipath.com/activities/docs/write-line), add a **Break** activity.
2. Under the **For Each**, add a new **Write Line** activity.
3. On the right side of the **Text** field, select **Plus**![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-plus_menu-8a20ac7d.png) &gt; **Open in Advanced Editor**.
4. Inside the **Expression Editor** window, type `FibonacciNumbers(0).ToString` + " " + `FibonacciNumbers(2).ToString` + " " + `FibonacciNumbers(4).ToString` + " " + `FibonacciNumbers(6).ToString` + " " + `FibonacciNumbers(8).ToString` + " " + `FibonacciNumbers(10).ToString` + " ". This means that only the indicated elements of the array are going to be written to the **Output** panel. The final project should look as in the following screenshot.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167205-78606102.webp)

5. Press F5. The automation is executed. Note that the **Output** panel only displays the first iteration of the loop and the specified array elements from the **Write Line** activity.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-171397-595a3ef3.webp)

[Download example](https://documentationexamplerepo.blob.core.windows.net/examples/Studio_v2022.10/ForEachActivityWithBreak.zip)
