# Code step

The code steps allows running JavaScript code snippets at any point without spinning an entire request. Among it's usages are introducing initialization logic at first step of a flow, processing specific data right after a generic shared flow, and providing more visibility and clarity in flows and it's special logic steps.

<figure><img src="/files/cN9KSNrTWQwl69b9yhnP" alt=""><figcaption></figcaption></figure>

The code step consists of two areas:

1. Code editor - a place to write your JavaScript snippets
2. Flow control - Allows skipping to another step, stopping the flow and add wait time after step execution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.loadmill.com/test-editor/steps/code-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
