mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 21:03:58 -05:00
51 lines
927 B
Markdown
51 lines
927 B
Markdown
---
|
|
id: bd7993c9ca9feddfaeb7bdef
|
|
title: قسّم رَقَم عشري على رَقَم عشري آخر باستخدام JavaScript
|
|
challengeType: 1
|
|
videoUrl: 'https://scrimba.com/c/cBZe9AW'
|
|
forumTopicId: 18255
|
|
dashedName: divide-one-decimal-by-another-with-javascript
|
|
---
|
|
|
|
# --description--
|
|
|
|
قسم رَقَم عشري على أخر.
|
|
|
|
# --instructions--
|
|
|
|
غيّر `0.0` بحيث أن `quotient` تساوي `2.2`.
|
|
|
|
# --hints--
|
|
|
|
يجب أن يساوي المتغير `quotient` قيمة `2.2`
|
|
|
|
```js
|
|
assert(quotient === 2.2);
|
|
```
|
|
|
|
يجب عليك استخدام المشغل `/` لتقسيم 4.4 على 2
|
|
|
|
```js
|
|
assert(/4\.40*\s*\/\s*2\.*0*/.test(code));
|
|
```
|
|
|
|
يجب تعيين متغير quotient مرة واحدة فقط
|
|
|
|
```js
|
|
assert(code.match(/quotient/g).length === 1);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
const quotient = 0.0 / 2.0; // Change this line
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
const quotient = 4.4 / 2.0;
|
|
```
|