Skip to content

Instantly share code, notes, and snippets.

View ECMessina's full-sized avatar

ECMessina

  • 20:31 (UTC -05:00)
View GitHub Profile
@ECMessina
ECMessina / main.dart
Last active July 18, 2023 20:10
Angela's Human
void main() {
// jenny is the new object
Human jenny = Human(startingHeight: 15, weight: 3.5);
// .height accessing height property
// this object.get this property
print(jenny.height);
jenny.height = 20;
print(jenny.height);
// .talk triggers the talk method
@ECMessina
ECMessina / main.dart
Created July 18, 2023 19:24
Angela's Love Score
void main() {
}
// if (condition) {instruction}
// == means is or is equal to
@ECMessina
ECMessina / main.dart
Last active July 18, 2023 19:58
Angela's Love Score
import 'dart:math';
void main() {
loveCalculator();
}
// if (condition) {instruction();}
// else {instruction();}
// == means is or is equal to
// != not equal to
@ECMessina
ECMessina / main.dart
Last active July 19, 2023 19:48
Arguments
/* Arguments/parameters are values passed into a function
* two kinds of A/p's are accepted in functions (Positional and Named)
* function then uses those values to carry out provided instructions
* (display on screen, use in a calculation, or send to another function)
*
* add is Positional required
* addTwo is Named optional
* addThree is Positional optional
* addFour is Named with default values
* addFive is Named parameters required