Last active
May 3, 2018 23:48
-
-
Save Sfshaza/89d0fdf2de199f6909c2cc259ab61674 to your computer and use it in GitHub Desktop.
Java-to-Dart codelab: Scream example - imperative code
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
String scream(int length) { | |
return "A${'a' * length}h!"; | |
} | |
main() { | |
var values = [1, 2, 3, 5, 10, 50]; | |
for (var length in values) { | |
print(scream(length)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will be replaced by https://gist.github.com/kwalrath/9bcb7dba6dca46e2a9dbfb300298461e.