mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-20 02:28:27 -05:00
910 B
910 B
id, title, challengeType, videoUrl, forumTopicId, dashedName
| id | title | challengeType | videoUrl | forumTopicId | dashedName |
|---|---|---|---|---|---|
| cf1111c1c11feddfaeb6bdef | Dividieren einer Zahl durch eine andere mit JavaScript | 1 | https://scrimba.com/c/cqkbdAr | 17566 | 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
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.
assert(quotient === 2);
Du solltest den Operator / verwenden.
assert(/\d+\s*\/\s*\d+/.test(code));
--seed--
--after-user-code--
(function(z){return 'quotient = '+z;})(quotient);
--seed-contents--
const quotient = 66 / 0;
--solutions--
const quotient = 66 / 33;