0Pricing
Dart Academy · Lesson

Printing, Comments, and Statements

Use print, comments, and semicolons correctly.

Talking to the Console

The print function is how your program speaks to you. Whatever you pass to it appears in the console. 🗣️

void main() {
  print('Learning Dart!');
}

Printing Different Values

You can pass print more than text. Give it a number or a calculation and it shows the result on screen.

void main() {
  print(42);
  print(2 + 3);
}

All lessons in this course

  1. What Dart Is and Why It Exists
  2. Install the SDK and Check Your Version
  3. Anatomy of main() and Hello World
  4. Printing, Comments, and Statements
← Back to Dart Academy