Challenge: Define the Variable
Task
- Define a variable named
myVarand assign the value15to it. - Print the variable
myVarto the console.
123___ ___ = ___; console.log(___);
- Use theΒ
letΒ keyword to declare a variable. - Assign the value 15 to the variable using the assignment operator (
=). - Use theΒ
console.log()Β function to print the variable's value to the console.
123let myVar = 15; console.log(myVar);
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain what the `let` keyword does in JavaScript?
What happens if I use `var` instead of `let` to declare the variable?
Can you show me how to print a different value using `console.log()`?
Awesome!
Completion rate improved to 2.33
Challenge: Define the Variable
Swipe to show menu
Task
- Define a variable named
myVarand assign the value15to it. - Print the variable
myVarto the console.
123___ ___ = ___; console.log(___);
- Use theΒ
letΒ keyword to declare a variable. - Assign the value 15 to the variable using the assignment operator (
=). - Use theΒ
console.log()Β function to print the variable's value to the console.
123let myVar = 15; console.log(myVar);
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2