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