How 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?
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 10
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat