935 B
935 B
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
cf1111c1c11feddfaeb4bdef | Sottrarre un numero da un altro con JavaScript | 1 | https://scrimba.com/c/cP3yQtk | 18314 | subtract-one-number-from-another-with-javascript |
--description--
Possiamo anche sottrarre un numero da un altro.
JavaScript utilizza il simbolo -
per la sottrazione.
Esempio
myVar = 12 - 6;
myVar
avrà il valore 6
.
--instructions--
Modifica lo 0
in modo che la differenza sia 12
.
--hints--
La variabile difference
dovrebbe essere uguale a 12.
assert(difference === 12);
Devi solo sottrarre un numero da 45.
assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code)));
--seed--
--after-user-code--
(function(z){return 'difference = '+z;})(difference);
--seed-contents--
var difference = 45 - 0;
--solutions--
var difference = 45 - 33;