Skip to content

seanpm2001/Learn-Dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

/Dart_programming_language_logo.svg

Learning Dart (programming language)

I know very little about the Dart programming language. I don't intend to go far with this language. This document will go over all of my knowledge of the Dart programming language.

Hello World in Dart

This is how you make a Hello World program in Dart:

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

Comments in Dart

Comments in Dart are the same as in PHP.

Single line comments

Single line comments in Dart are written like so:

// This is a single line comment
Multi-line comments

Multi-line comments in Dart are written like so:

/* This is a
* multi-line
* comment */
/* This is 
also a
multi-line
comment
*/

Break keyword in Dart

break;

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Classes in Dart

Dart supports classes. They can be implemented like so:

class myDartClass {
    print("Welcome to Dart class");
    break;
}

/!\ This example has not been tested yet, and may not work

Other knowledge of the Dart programming language

  1. Dart is a language by Google

  2. Dart is a semicolon and curly bracket language

  3. Dart uses the *.dart file extension by default

  4. Dart is a functional programming language

  5. Dart is heavily influenced by C in syntax

  6. Dart transpiles to JavaScript, similarly to languages like TypeScript

  7. Dart is one of the top 50 programming languages (as of 2022, July 31st, ranking #32)

  8. Dart was first created in the year 2011

  9. No other knowledge of the Dart programming language

Additional comments

  1. I have no intentions to use this language seriously

  2. No other additional comments available


File info

File type: Markdown document (*.md *.mkd *.mdown *.markdown)

File version: 1 (2022, Monday, August 1st at 4:48 pm PST)

Line count (including blank lines and compiler line): 147


File history

Click/tap here to expand/collapse the history for this file

Version 1 (2022, Monday, August 1st at 4:48 pm PST)

Changes:

  • Started the file
  • Added the title section
  • Added the Hello World in Dart section
  • Added the Comments in Dart section
  • Added the Single line comments subsection
  • Added the Multi-line comments subsection
  • Added the break keyword in Dart section
  • Added the classes in Dart section
  • Added the other knowledge of the Dart programming language section
  • Added the Additional comments section
  • Added the file info section
  • Added the file history section
  • No other changes in version 1