Skip to content

Instantly share code, notes, and snippets.

@suragch
Last active September 16, 2021 03:48
Show Gist options
  • Save suragch/2004745c893ec9e2d1a6c1a8bb5a1afa to your computer and use it in GitHub Desktop.
Save suragch/2004745c893ec9e2d1a6c1a8bb5a1afa to your computer and use it in GitHub Desktop.
September 16, 2021
void main() {
// 1. Comment
// This is a comment.
// 2. Printing
print('Hello');
// 3. Math
print(3 + 7);
print(6 - 2);
print(9 * 7);
print(8 / 3);
print(4 ~/ 3);
print(10 % 3);
// 4. Variables
int x = 3;
x = 1;
print(x);
// 5. const and final
const myInteger = 10;
final now = DateTime.now();
print(myInteger);
print(now);
// 6. Good name
const numberOfStudents = 16;
print(numberOfStudents);
// 7. Increment and decrement
var counter = 0;
counter += 2;
counter -= 1;
print(counter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment