Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 596 Bytes

ex-dart.md

File metadata and controls

31 lines (21 loc) · 596 Bytes

1.1 Running a Dart application

Example Code:

The print() function is used to print text to the console. In this case, the text that is printed is "Hello, Dart World!".

The print() function is a built-in function in Dart. It can be used to print any type of data, including strings, numbers, and objects.

Use Dart to print a message on screen.

void main() {
  print('Hello, Dart World!');
}

To run a dart application from the command line:

dart main.dart

Example Output:

The result of the print statement is shown below:

Hello, Dart World!