# Never Nesting

Never nesting is an excellent way to make you code neater and easy to follow and understand. When you have a whole bunch of nested sections, whether loops, if statements, or something else, it can be difficult to keep track of everything.

Never nesting means doing your best to avoid nesting code unless it's absolutely necessary. This makes your code easier to read through, and with the use of guard clauses and functions, reduces the amount of things you need to think about at once.

{% hint style="warning" %}
Those who don't never nest often find themselves creating a "stairway to Hell"—a whole bunch of code leading to the bottom-right corner of their screen, like a staircase descending down into the fiery depths of Hell.

You should keep track of how much you are nesting your code and use strategies to keep it under control and salvage legibility.
{% endhint %}


---

# 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://x8ight.gitbook.io/syntask/organisation/never-nesting.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.
