Files
freeCodeCamp/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.md
2022-08-19 20:53:29 +02:00

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;