Last active
September 22, 2018 17:17
-
-
Save kishorekumar080297/d999731f8eef1395cba67ad1604b26e4 to your computer and use it in GitHub Desktop.
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
//Create by Kishore Kumar G on 22/09/2018 (https://github.com/kishorekumar080297) | |
void main() { | |
print("Superheroes:"); | |
var superheroes = ['hulk', 'superman', 'batman', 'flash', 'iron man']; | |
superheroes.forEach((hero) { | |
print('At position: ${superheroes.indexOf(hero)+1} Next hero is ${hero}'); | |
}); | |
print('\n'); | |
print("Programming Languages:"); | |
var languages = ['Python', 'C++', 'Java', 'C', 'Ruby']; | |
languages.forEach((language) { | |
print('At position: ${languages.indexOf(language)+1} ${language}'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment