Files
freeCodeCamp/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.md
Mani Chandra Teja Gaddam a62c7cd190 fix(curriculum): check for assignment operator (#49904)
fix(curriculum): updated third test to check for assignment operator
2023-03-31 11:14:36 +02:00

828 B

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
bd7993c9ca9feddfaeb7bdef Divide One Decimal by Another with JavaScript 1 https://scrimba.com/c/cBZe9AW 18255 divide-one-decimal-by-another-with-javascript

--description--

Now let's divide one decimal by another.

--instructions--

Change the 0.0 so that quotient will equal to 2.2.

--hints--

The variable quotient should equal 2.2

assert(quotient === 2.2);

You should use the / operator to divide 4.4 by 2

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

The quotient variable should only be assigned once

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

--seed--

--seed-contents--

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

--solutions--

const quotient = 4.4 / 2.0;