* chore(i18n,curriculum): update translations * chore: Italian to italian Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
1.2 KiB
1.2 KiB
id, title, challengeType, videoUrl, forumTopicId, dashedName
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
56533eb9ac21ba0edf2244ad | Decrementare un numero con JavaScript | 1 | https://scrimba.com/c/cM2KeS2 | 17558 | decrement-a-number-with-javascript |
--description--
Puoi facilmente decrementare o diminuire una variabile con l'operatore --
.
i--;
è equivalente a
i = i - 1;
Nota: L'intera linea diventa i--;
, eliminando la necessità di un segno uguale.
--instructions--
Cambia il codice per utilizzare l'operatore --
su myVar
.
--hints--
myVar
dovrebbe essere uguale a 10
.
assert(myVar === 10);
myVar = myVar - 1;
dovrebbe essere modificato.
assert(
/var\s*myVar\s*=\s*11;\s*\/*.*\s*([-]{2}\s*myVar|myVar\s*[-]{2});/.test(code)
);
Dovresti usare l'operatore --
su myVar
.
assert(/[-]{2}\s*myVar|myVar\s*[-]{2}/.test(code));
Non dovresti modificare il codice sopra il commento specificato.
assert(/var myVar = 11;/.test(code));
--seed--
--after-user-code--
(function(z){return 'myVar = ' + z;})(myVar);
--seed-contents--
var myVar = 11;
// Only change code below this line
myVar = myVar - 1;
--solutions--
var myVar = 11;
myVar--;