Basic JavaScript - Decrement a Number with JavaScript

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

let myVar = 11;

// Only change code below this line
myVar = myVar - 1;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64

Challenge: Basic JavaScript - Decrement a Number with JavaScript

Link to the challenge:

I think it would be best to re-read the challenge example and try again

" You can easily decrement or decrease a variable by one with the -- operator.

i--;

is the equivalent of

i = i - 1;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.