Files
freeCodeCamp/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.md
freeCodeCamp's Camper Bot e6b05ee25d chore(i18n,learn): processed translations (#54537)
Co-authored-by: Naomi <nhcarrigan@gmail.com>
2024-04-26 12:26:37 +07:00

60 lines
938 B
Markdown

---
id: cf1111c1c11feddfaeb6bdef
title: Dividieren einer Zahl durch eine andere mit JavaScript
challengeType: 1
videoUrl: 'https://scrimba.com/c/cqkbdAr'
forumTopicId: 17566
dashedName: divide-one-number-by-another-with-javascript
---
# --description--
Wir können auch eine Zahl durch eine andere dividieren.
JavaScript verwendet das Symbol `/` für die Division.
**Beispiel**
```js
const myVar = 16 / 2;
```
`myVar` hat jetzt den Wert `8`.
# --instructions--
Ändere die `0` so, dass der `quotient` gleich `2` ist.
# --hints--
Die Variable `quotient` sollte 2 sein.
```js
assert(quotient === 2);
```
Du solltest den Operator `/` verwenden.
```js
assert(/\d+\s*\/\s*\d+/.test(__helpers.removeJSComments(code)));
```
# --seed--
## --after-user-code--
```js
(function(z){return 'quotient = '+z;})(quotient);
```
## --seed-contents--
```js
const quotient = 66 / 0;
```
# --solutions--
```js
const quotient = 66 / 33;
```