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

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

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt