Last active
July 8, 2021 21:51
-
-
Save zoytsa/562de56a5dc1ea41c0d08b73c4648f35 to your computer and use it in GitHub Desktop.
skbx_hw_2
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() { | |
| List<String> users = ['anna', 'viKtor', 'Mike', 'aleX', 'dan']; | |
| print(users); | |
| List<String> newUsers = []; | |
| int i = 0; | |
| for (i; i < users.length; i++) { | |
| String element = users[i]; | |
| String newElement = (element.substring(0, 1).toUpperCase() + | |
| element.substring(1).toLowerCase()); | |
| newUsers.add(newElement); | |
| } | |
| print(newUsers); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment