Conteúdo do Curso
Introduction to JavaScript
Introduction to JavaScript
3. Performing Operations in JavaScript
Understanding Assignment OperatorsMathematical Operations in JavaScriptAssignment Operators in JavaScriptIncrement and Decrement OperatorsChallenge: Variable Operations PracticeComparison Operators in JavaScriptLogical Operators ExplainedChallenge: Compare Variables in JavaScriptConcatenating Strings in JavaScriptChallenge: Build Sentences with JavaScript
4. Controlling Program Flow with Conditional Statements
5. Looping Through Data in JavaScript
Challenge: Variable Operations Practice
Task
- Create the variable
num
. - Assign the value
29
to the variablenum
. - Increase the
num
variable by 99. - Decrease the
num
variable by 23.
let num; num ___ 29; console.log(num); num ___ 99; console.log(num); num ___ 23; console.log(num);
The output should be:
- Assign values to the variable using the assignment operator (
=
). - Use arithmetic operators to perform calculations on the variable (
+=
and-=
).
let num; num = 29; console.log(num); num += 99; console.log(num); num -= 23; console.log(num);
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 5