Created
March 12, 2019 14:23
-
-
Save chooyan-eng/264cbaaa7e352812a196699ed68ce194 to your computer and use it in GitHub Desktop.
Test that var can be used at arguments of functions in Dart.
This file contains hidden or 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() { | |
printArg(10); // -> 10 | |
printArg("10"); // -> 10 | |
printArg([10, 20, 30]); // -> [10, 20, 30] | |
printArg({10, 20, 30}); // -> {10, 20, 30} | |
} | |
printArg(var arg) { | |
print(arg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment