# Базові математичні операції

[**Ця задача на Codewars: Basic Mathematical Operations**](https://www.codewars.com/kata/basic-mathematical-operations/train/javascript)

*Розв'язали?*&#x412;аше завдання — створити функцію, яка виконує чотири основні математичні дії.

Функція повинна приймати три аргументи: операція (рядок), значення1 (число), значення2 (число). Функція повинна повертати результат після застосування вибраної дії до чисел.

```javascript
basicOp('+', 4, 7)         // Output: 11
basicOp('-', 15, 18)       // Output: -3
basicOp('*', 5, 5)         // Output: 25
basicOp('/', 49, 7)        // Output: 7
```

*Перевірте рішення автотестами на сторінці самої задачі (і **Test**, і **Attempt**).*\
*Про всяк випадок, ось* [*інструкція з Codewars*](/zero/tutorials/codewars.md)*.*

{% hint style="warning" %}
**Увага**! На Сodewars можна самостійно перевірити, чи правильно працює код. А нюанси стилю можна зрозуміти, порівнюючи своє рішення із чужими. Тому **волонтери не рев'ювають задачі з Сodewars.**
{% endhint %}

*Виникли питання або труднощі?* [*Зверніться за допомогою до Ш++.*](/zero/arrangements/support.md)


---

# 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://shpp.gitbook.io/zero/tutorials/codewars/math-ops-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.
