> For the complete documentation index, see [llms.txt](https://docs.watbot.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.watbot.ru/js-api/osnovy.md).

# Основы

{% content-ref url="/pages/xWZZexTorFpgw8gRM3Hi" %}
[Переменные](/js-api/peremennye.md)
{% endcontent-ref %}

{% content-ref url="/pages/WTp0TtF61ojZDz8yxlr2" %}
[Функции](/js-api/funkcii.md)
{% endcontent-ref %}

{% content-ref url="/pages/JHU9xVkvbWqkYSnbxHwF" %}
[Блок "HTTP-запрос"](/js-api/blok-http-zapros.md)
{% endcontent-ref %}

### Ограничения

* Количество символов вашего кода не должно превышать 16384.
* Код должен выполняться не более 5 секунд, иначе система прервет его выполнение, а пользователь получит в чат сообщение об ошибке.
* Watbot JavaScript нацелен на ES5. Функции ES6 (например, типизированные массивы) не поддерживаются.
* Механизм регулярных выражений не полностью соответствует спецификации ES5.
* "use strict" обрабатывается, но игнорируется.

### Несовместимость регулярных выражений

Регулярные выражения Watbot JavaScript соответствует стандарту [re2/regexp](https://github.com/google/re2/wiki/Syntax) и не полностью соответствуют спецификации ES5, поэтому следующий синтаксис работать не будет:

```
(?=)  // Lookahead (positive), в настоящее время ошибка синтаксического анализа
(?!)  // Lookahead (backhead), в настоящее время ошибка синтаксического анализа
\1    // Backreference (\1, \2, \3, ...), в настоящее время ошибка синтаксического анализа
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.watbot.ru/js-api/osnovy.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.
