Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Write a Single-Line Comment | JavaScript Fundamentals
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: Write a Single-Line Comment

Let's work on improving our commenting skills by practicing with some code.

Task

Comment the second and the fifth lines of code.

12345
console.log("line 1"); ___ console.log("line 2"); console.log("line 3"); console.log("line 4"); ___ console.log("line 5");
copy

Use the single-line comment (//).

12345
console.log("line 1"); // console.log("line 2"); console.log("line 3"); console.log("line 4"); // console.log("line 5");
copy

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

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