Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Variable Operations | Basic Operations
Introduction to JavaScript
course content

Contenido del Curso

Introduction to JavaScript

Introduction to JavaScript

1. Basic Concepts
2. Variables and Data Types
3. Basic Operations
4. Conditional Statements
5. Loops
6. Functions

bookChallenge: Variable Operations

Task

  1. Create the variable num.
  2. Assign the value 29 to the variable num.
  3. Increase the num variable by 99.
  4. Decrease the num variable by 23.
123456789
let num; num ___ 29; console.log(num); num ___ 99; console.log(num); num ___ 23; console.log(num);
copy

The output should be:

  1. Assign values to the variable using the assignment operator (=).
  2. Use arithmetic operators to perform calculations on the variable (+= and -=).
123456789
let num; num = 29; console.log(num); num += 99; console.log(num); num -= 23; console.log(num);
copy

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 5
some-alt