Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære How to Use Comments in Javascript? | Section
JavaScript Essentials for Beginners - 1768407374405

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

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 10

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

bookHow to Use Comments in Javascript?

Sveip for å vise menyen

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

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 10
some-alt