Last active
April 13, 2020 15:02
-
-
Save erluxman/fa46336f5c1b3287c6420d3b3a277178 to your computer and use it in GitHub Desktop.
FunctionnArguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
f2(f1, 3); | |
f2(f1, 4); | |
f2(f1, 7); | |
f2(f1, 9); | |
} | |
f1(int evenOrOdd) { | |
print("$evenOrOdd is ${evenOrOdd % 2 == 0 ? "Even" : "Odd"}"); | |
} | |
f2(Function(int) evenOrOddFunction, int argumentToPass) { | |
evenOrOddFunction(argumentToPass); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment