Dev study and notes

[dart] #17 #3.3 Optional Positional Parameters (03:02) 본문

studyLog

[dart] #17 #3.3 Optional Positional Parameters (03:02)

devlunch4 2023. 5. 3. 05:58
반응형
String sayHello(String name, int age, [String? country = 'Canada']) =>
    "Hello, $name, You are $age, and  you come from $country";

void main() {
    var results = (sayHello("lunch", 100));
    print(results);
}

// PRINT
// >>>
// Hello, lunch, You are 100, and  you come from Canada
반응형
Comments