Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Dart Comments | First Acquaintance with Dart
Introduction to Dart

bookDart Comments

Developers use comments to make code easier to understand. The Dart interpreter ignores them, allowing you to explain what the code does or clarify its purpose.

main.dart

main.dart

copy
123
void main() { print('Correct'); // Outputs word Correct to the console }

You can comment out code blocks to prevent them from running. This is helpful for avoiding runtime errors or testing specific parts of your code.

main.dart

main.dart

copy
12345
void main() { // print("This is a test!"); print('Hello, World!'); // print Hello, World!"'() }

Dart supports single-line comments // and multi-line comments /* */.

main.dart

main.dart

copy
123456
void main() { /* Displaying information to the console */ print('Very useful topic'); // Outputs to the console }
question mark

How many times will the word Dart be displayed in the console?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Awesome!

Completion rate improved to 4.55

bookDart Comments

Swipe um das Menü anzuzeigen

Developers use comments to make code easier to understand. The Dart interpreter ignores them, allowing you to explain what the code does or clarify its purpose.

main.dart

main.dart

copy
123
void main() { print('Correct'); // Outputs word Correct to the console }

You can comment out code blocks to prevent them from running. This is helpful for avoiding runtime errors or testing specific parts of your code.

main.dart

main.dart

copy
12345
void main() { // print("This is a test!"); print('Hello, World!'); // print Hello, World!"'() }

Dart supports single-line comments // and multi-line comments /* */.

main.dart

main.dart

copy
123456
void main() { /* Displaying information to the console */ print('Very useful topic'); // Outputs to the console }
question mark

How many times will the word Dart be displayed in the console?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
some-alt