Files
freeCodeCamp/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.md

60 lines
1.1 KiB
Markdown

---
id: cf1111c1c11feddfaeb6bdef
title: Ділення одного числа на інше за допомогою JavaScript
challengeType: 1
videoUrl: 'https://scrimba.com/c/cqkbdAr'
forumTopicId: 17566
dashedName: divide-one-number-by-another-with-javascript
---
# --description--
Також ми можемо поділити одне число на інше.
JavaScript використовує символ `/` для ділення.
**Приклад**
```js
const myVar = 16 / 2;
```
`myVar` тепер набуває значення `8`.
# --instructions--
Змініть `0` таким чином, щоб `quotient` дорівнювало `2`.
# --hints--
Змінна `quotient` має дорівнювати 2.
```js
assert(quotient === 2);
```
Вам слід використовувати оператор `/`.
```js
assert(/\d+\s*\/\s*\d+/.test(code));
```
# --seed--
## --after-user-code--
```js
(function(z){return 'quotient = '+z;})(quotient);
```
## --seed-contents--
```js
const quotient = 66 / 0;
```
# --solutions--
```js
const quotient = 66 / 33;
```