Last active
October 1, 2018 04:54
-
-
Save JoeUX/70ef305ff8e64bca94dac2ebd4dd62fa to your computer and use it in GitHub Desktop.
A basic Dart program, taken from the Dart website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define a function. | |
printInteger(int aNumber) { | |
print('The number is $aNumber.'); // Print to console. | |
} | |
// This is where the app starts executing. | |
main() { | |
var number = 42; // Declare and initialize a variable. | |
printInteger(number); // Call a function. | |
} | |
// From https://www.dartlang.org/guides/language/language-tour |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A better programming language would look like this:
var number = 42
display "The number is {{number}}."
Notes:
main
.