This file contains hidden or 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
| int globalVar = 400; | |
| void main() { | |
| int abc = 123; | |
| print("abc in main() - $abc"); | |
| print("globalVar in main() - $globalVar\n"); | |
| updateMyVars(abc: abc); | |
This file contains hidden or 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
| 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; |
This file contains hidden or 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
| /* | |
| 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, |