Files
freeCodeCamp/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.md
Nicholas Carrigan (he/him) f25e3e69f8 feat: enable new langs (#42491)
Enable italian and portuguese
2021-06-15 13:19:18 +05:30

862 B

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
cf1111c1c11feddfaeb6bdef Divide One Number by Another with JavaScript 1 https://scrimba.com/c/cqkbdAr 17566 divide-one-number-by-another-with-javascript

--description--

We can also divide one number by another.

JavaScript uses the / symbol for division.

Example

myVar = 16 / 2;

myVar now has the value 8.

--instructions--

Change the 0 so that the quotient is equal to 2.

--hints--

The variable quotient should be equal to 2.

assert(quotient === 2);

You should use the / operator.

assert(/\d+\s*\/\s*\d+/.test(code));

--seed--

--after-user-code--

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

--seed-contents--

var quotient = 66 / 0;

--solutions--

var quotient = 66 / 33;