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

Kursusindhold

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

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 2
Vi beklager, at noget gik galt. Hvad skete der?
some-alt