Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Define the Variable | Variables and Data Types in JavaScript
Introduction to JavaScript
course content

Course Content

Introduction to JavaScript

Introduction to JavaScript

1. JavaScript Fundamentals
2. Variables and Data Types in JavaScript
3. Performing Operations in JavaScript
4. Controlling Program Flow with Conditional Statements
5. Looping Through Data in JavaScript
6. Functions in JavaScript

book
Challenge: Define the Variable

Task

  1. Define a variable named myVar and assign the value 15 to it.
  2. Print the variable myVar to the console.
123
___ ___ = ___; console.log(___);
copy
  1. Use the let keyword to declare a variable.
  2. Assign the value 15 to the variable using the assignment operator (=).
  3. Use the console.log() function to print the variable's value to the console.
123
let myVar = 15; console.log(myVar);
copy

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 2
We're sorry to hear that something went wrong. What happened?
some-alt