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

1.1 KiB
Raw Blame History

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
bd7993c9ca9feddfaeb7bdef Ділення одного десяткового на інше у JavaScript 1 https://scrimba.com/c/cBZe9AW 18255 divide-one-decimal-by-another-with-javascript

--description--

Тепер давайте поділимо одне десяткове число на інше.

--instructions--

Змініть 0.0 таким чином, щоб quotient дорівнювало 2.2.

--hints--

Змінна quotient повинна дорівнювати 2.2

assert(quotient === 2.2);

Вам слід використовувати оператор /, щоб поділити 4.4 на 2

assert(/4\.40*\s*\/\s*2\.*0*/.test(code));

Коефіцієнтна змінна повинна бути визначена лише раз

assert(code.match(/quotient/g).length === 1);

--seed--

--after-user-code--

(function(y){return 'quotient = '+y;})(quotient);

--seed-contents--

const quotient = 0.0 / 2.0; // Change this line

--solutions--

const quotient = 4.4 / 2.0;