Challenge: Variable Operations Practice
Task
- Create the variable
num. - Assign the value
29to the variablenum. - Increase the
numvariable by 99. - Decrease the
numvariable by 23.
123456789let num; num ___ 29; console.log(num); num ___ 99; console.log(num); num ___ 23; console.log(num);
The output should be:
29
128
105
- Assign values to the variable using the assignment operator (
=). - Use arithmetic operators to perform calculations on the variable (
+=Β andΒ-=).
123456789let num; num = 29; console.log(num); num += 99; console.log(num); num -= 23; console.log(num);
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 5
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.33
Challenge: Variable Operations Practice
Swipe to show menu
Task
- Create the variable
num. - Assign the value
29to the variablenum. - Increase the
numvariable by 99. - Decrease the
numvariable by 23.
123456789let num; num ___ 29; console.log(num); num ___ 99; console.log(num); num ___ 23; console.log(num);
The output should be:
29
128
105
- Assign values to the variable using the assignment operator (
=). - Use arithmetic operators to perform calculations on the variable (
+=Β andΒ-=).
123456789let num; num = 29; console.log(num); num += 99; console.log(num); num -= 23; console.log(num);
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 5