Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

positional arguments dart

void main() {
  print(fullname("yo", "hope you have amazing day"));
}

// this fancy [] will do the job
String fullname(String fname, String lname, [String age = '23']) {
  return fname + lname + age;
}
 
PREVIOUS NEXT
Tagged: #positional #arguments #dart
ADD COMMENT
Topic
Name
3+8 =