> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/tools/custom-code/libraries/loop.md).

# Loop

Reference for the MESA Loop.js custom code library, including the runReplace helper that applies replace and render functions to variables in each loop.

vendor/Loop.js

## Loop()

Procecsses loop conditions / values

##### Returns

- `Void`

## runReplace(value, regexp, context)

Helper function runs the replace and render functions for each variable

##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| value |  |  | &nbsp; |
| regexp | `RegExp`  |  | &nbsp; |
| context |  |  | &nbsp; |

##### Returns

-
