Skip to content
RED SAG Skills
medium10 pts · first answer countscross-platform-mobiledart

Returning two values with a record

What does this Dart 3 code print?

(int, int) divide(int a, int b) => (a ~/ b, a % b);

void main() {
  var (q, r) = divide(7, 2);
  print('$q and $r');
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions