Utfordring: Skriv en Flerlinjekommentar
Oppgave
Kommenter ut linjene 3 til 10 av koden, og erstatt ___ med riktig syntaks for en flerslinjet kommentar.
1234567891011console.log("Hello, world!"); console.log("Welcome to the console!"); ___ console.log("I'm awesome!"); console.log("Today is a great day!"); console.log("The quick brown fox jumps over the lazy dog."); console.log("JavaScript is the language of the web."); console.log("Bananas are berries, but strawberries aren't."); console.log("Coding is my passion!"); ___ console.log("Don't forget to stay hydrated!");
Bruk flerlinierskommentaren som starter med /* og slutter med */.
1234567891011console.log("Hello, world!"); console.log("Welcome to the console!"); /* console.log("I'm awesome!"); console.log("Today is a great day!"); console.log("The quick brown fox jumps over the lazy dog."); console.log("JavaScript is the language of the web."); console.log("Bananas are berries, but strawberries aren't."); console.log("Coding is my passion!"); */ console.log("Don't forget to stay hydrated!");
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 6
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Suggested prompts:
Can you explain why we use multiline comments instead of single-line comments here?
What would happen if I used // instead of /* */ for these lines?
Can you show me how to uncomment these lines if I want them to run again?
Awesome!
Completion rate improved to 2.33
Utfordring: Skriv en Flerlinjekommentar
Sveip for å vise menyen
Oppgave
Kommenter ut linjene 3 til 10 av koden, og erstatt ___ med riktig syntaks for en flerslinjet kommentar.
1234567891011console.log("Hello, world!"); console.log("Welcome to the console!"); ___ console.log("I'm awesome!"); console.log("Today is a great day!"); console.log("The quick brown fox jumps over the lazy dog."); console.log("JavaScript is the language of the web."); console.log("Bananas are berries, but strawberries aren't."); console.log("Coding is my passion!"); ___ console.log("Don't forget to stay hydrated!");
Bruk flerlinierskommentaren som starter med /* og slutter med */.
1234567891011console.log("Hello, world!"); console.log("Welcome to the console!"); /* console.log("I'm awesome!"); console.log("Today is a great day!"); console.log("The quick brown fox jumps over the lazy dog."); console.log("JavaScript is the language of the web."); console.log("Bananas are berries, but strawberries aren't."); console.log("Coding is my passion!"); */ console.log("Don't forget to stay hydrated!");
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 6