Skip to content

Instantly share code, notes, and snippets.

@mdecourse
Created September 4, 2019 01:06
Show Gist options
  • Select an option

  • Save mdecourse/2d3ce078f1c3d383c0c20e88270f6d6b to your computer and use it in GitHub Desktop.

Select an option

Save mdecourse/2d3ce078f1c3d383c0c20e88270f6d6b to your computer and use it in GitHub Desktop.
Hello World Dart
/*
This line declares a function called main(). Functions are a
block of statements that the computer executes when the function is “called.” main() is always the entry point of a Dart program—the place where the
program begins execution. main() is automatically called (executed). The void indicates that the main() function will not return any value. The opening curly brace indicates where the function starts. The empty parentheses mean that this function takes no arguments.
The main() function has only one statement. This statement calls a function built into Dart named “print,” which will print out any line of text to the console. A piece of text is known as a string, and in its literal form is contained within quotes. So, this function, print(), takes one argument, a string literal, and prints it out to the console. The semicolon at the end of the line indicates where
the statement ends.
*/
void main() {
print("Hello, World!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment