# Directual + JavaScript SDK: The Basics

There are two options for using the JS SDK in Directual:

* [Inline JS execution](/template-system/evaluating-as-js-expression.md)
* JS SDK steps ([Actions](/scenarios/editing-scenarios/action-steps/js-sdk-step.md) and [Conditions](/scenarios/editing-scenarios/condition-steps/js-sdk-condition-step.md))

{% hint style="warning" %}
Currently, Directual JS SDK is based on ES5.
{% endhint %}

Common use cases for applying the JS SDK:

* [Dealing with arrays](/template-system/tips-for-working-with-data.md#dealing-with-arrays)
* [Dealing with dates](/template-system/tips-for-working-with-data.md#dealing-with-dates)
* Complex string processing (e.g. converting)

Also, be sure to check out the following:

* [List of internal `$D` methods](/javascript-sdk/internal-usdd-methods.md)

### Additional Resources

* [MDN JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide): Get a high-level overview of fundamental JavaScript concepts
* [Codecademy Introduction to JavaScript](https://www.codecademy.com/learn/introduction-to-javascript): Learn JavaScript in this free online course with interactive lessons.


---

# 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://readme.directual.com/javascript-sdk/directual-javascript-sdk-basics.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.
