Files
freeCodeCamp/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.md
2022-10-18 12:59:49 +05:30

51 lines
867 B
Markdown

---
id: bd7993c9ca9feddfaeb7bdef
title: Dividieren einer Dezimalzahl durch eine andere mit JavaScript
challengeType: 1
videoUrl: 'https://scrimba.com/c/cBZe9AW'
forumTopicId: 18255
dashedName: divide-one-decimal-by-another-with-javascript
---
# --description--
Dividieren wir nun eine Dezimalzahl durch eine andere.
# --instructions--
Ändere `0.0`, so dass `quotient` gleich `2.2` wird.
# --hints--
Die Variable `quotient` sollte gleich `2.2` sein.
```js
assert(quotient === 2.2);
```
Verwende den Operator `/`, um 4,4 durch 2 zu teilen.
```js
assert(/4\.40*\s*\/\s*2\.*0*/.test(code));
```
Die Quotientenvariable sollte nur einmal zugewiesen werden
```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;
```