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

bookChallenge: 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

Ask AI

ChatGPT

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

bookChallenge: 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
some-alt