Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Single-line Comment | Basic Concepts
Introduction to JavaScript

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

console.log("line 1");
___ console.log("line 2");
console.log("line 3");
console.log("line 4");
___ console.log("line 5");
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 (//).

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

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 5
We use cookies to make your experience better!
some-alt