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
- What Dart Is and Why It Exists
- Install the SDK and Check Your Version
- Anatomy of main() and Hello World
- Printing, Comments, and Statements