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.
12345console.log("line 1"); ___ console.log("line 2"); console.log("line 3"); console.log("line 4"); ___ console.log("line 5");
Use the single-line comment (//
).
12345console.log("line 1"); // console.log("line 2"); console.log("line 3"); console.log("line 4"); // console.log("line 5");
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain why we use comments in code?
What is the difference between single-line and multi-line comments in JavaScript?
Can you show me how to uncomment a line if I need to run it again?
Awesome!
Completion rate improved to 2.33
Challenge: Write a Single-Line Comment
Swipe to show menu
Let's work on improving our commenting skills by practicing with some code.
Task
Comment the second and the fifth lines of code.
12345console.log("line 1"); ___ console.log("line 2"); console.log("line 3"); console.log("line 4"); ___ console.log("line 5");
Use the single-line comment (//
).
12345console.log("line 1"); // console.log("line 2"); console.log("line 3"); console.log("line 4"); // console.log("line 5");
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5