Lesson contents

Print a value

Print a value to see it on the screen.

Simple example

Start3
Result3
lesson.dart
void main() {
    print(3);
}
Output
3
Advertisements

Everyday examples

A ticket machine displays 27. Show that number on the screen.

Start27
Result27
lesson.dart
void main() {
    print(27);
}
Output
27
Run the example
Terminal
dart run lesson.dart
Official documentation