Skip to content

Instantly share code, notes, and snippets.

View ECMessina's full-sized avatar

ECMessina

  • 12:19 (UTC -05:00)
View GitHub Profile
@dbmessina
dbmessina / main.dart
Created July 17, 2023 16:44
Variable scope
int globalVar = 400;
void main() {
int abc = 123;
print("abc in main() - $abc");
print("globalVar in main() - $globalVar\n");
updateMyVars(abc: abc);
@dbmessina
dbmessina / main.dart
Last active July 2, 2023 18:36
Reference material
void main() {
List<String> letters = ["a", "b", "c"];
// The next two variables are random whatever,
// but used to show we can manipulate them inside of our loops
// We can do more than print()!
// Just happen to use print() a lot to learn, visualize, and debug
// That's about all you use it for actually, app user will never see your print()s
List<String> allLetters = [];
int growingNumber = 2;
@dbmessina
dbmessina / main.dart
Last active July 13, 2023 17:29
Fibonacci Sequence
/*
Fibonacci sequence - 0, 1, 1, 2, 3, 5, 8, 13...
Write a function that takes in the number of the Fibonacci sequence
that I want to find and it will return that number.
For example, if I pass in 8, the function will return 13. I'll print
the number in main().
I already know that the first two numbers in the sequence are 0 and 1,