What does this print?
int triple(int n) => n * 3;
int calc(int x) =>
triple(x) + 2;
void main() {
print(calc(4));
}
Try it in the online Dart Playground →
[spoiler title="Solution"]
Answer:
14
Explanation:
Arrow syntax => provides a concise way to write single-expression functions.
[/spoiler]