Files
freecodecamp--freecodecamp/curriculum/challenges/english/blocks/basic-javascript/bd7993c9ca9feddfaeb7bdef.md
T
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

50 lines
842 B
Markdown

---
id: bd7993c9ca9feddfaeb7bdef
title: Divide One Decimal by Another with JavaScript
challengeType: 1
forumTopicId: 18255
dashedName: 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`
```js
assert(quotient === 2.2);
```
You should use the `/` operator to divide 4.4 by 2
```js
assert(/4\.40*\s*\/\s*2\.*0*/.test(__helpers.removeJSComments(code)));
```
The quotient variable should only be assigned once
```js
assert(__helpers.removeJSComments(code).match(/quotient\s*=/g).length === 1);
```
# --seed--
## --seed-contents--
```js
const quotient = 0.0 / 2.0; // Change this line
```
# --solutions--
```js
const quotient = 4.4 / 2.0;
```