freeCodeCamp/curriculum/challenges/italian/02-javascript-algorithms-an.../basic-javascript/divide-one-number-by-anothe...

894 B

id title challengeType videoUrl forumTopicId dashedName
cf1111c1c11feddfaeb6bdef Dividere un numero per un altro con JavaScript 1 https://scrimba.com/c/cqkbdAr 17566 divide-one-number-by-another-with-javascript

--description--

Possiamo anche dividere un numero per un altro.

JavaScript utilizza il simbolo / per la divisione.

Esempio

const myVar = 16 / 2;

myVar ora ha il valore 8.

--instructions--

Modifica lo 0 in modo che quotient sia uguale a 2.

--hints--

La variabile quotient dovrebbe essere uguale a 2.

assert(quotient === 2);

Dovresti usare l'operatore /.

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;