Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn How to Use Comments in Javascript? | Getting Started
Introduction to JavaScript

bookHow to Use Comments in Javascript?

Summary

  • Comments: a way to include useful notes or explanations in the code, or to temporarily ignore a piece of code;
  • Single-line comment: used to add a comment that only takes up one line;
  • The syntax of a single-line comment is:
// your comment text here …

1. What symbol is used to create a single-line comment in JavaScript?

2. Which of the following is a correct example of a single-line comment?

question mark

What symbol is used to create a single-line comment in JavaScript?

Select the correct answer

question mark

Which of the following is a correct example of a single-line comment?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 10

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 1.33

bookHow to Use Comments in Javascript?

Swipe to show menu

Summary

  • Comments: a way to include useful notes or explanations in the code, or to temporarily ignore a piece of code;
  • Single-line comment: used to add a comment that only takes up one line;
  • The syntax of a single-line comment is:
// your comment text here …

1. What symbol is used to create a single-line comment in JavaScript?

2. Which of the following is a correct example of a single-line comment?

question mark

What symbol is used to create a single-line comment in JavaScript?

Select the correct answer

question mark

Which of the following is a correct example of a single-line comment?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 10
some-alt