Skip to content

Instantly share code, notes, and snippets.

@kishorekumar080297
Last active September 22, 2018 17:17
Show Gist options
  • Save kishorekumar080297/d999731f8eef1395cba67ad1604b26e4 to your computer and use it in GitHub Desktop.
Save kishorekumar080297/d999731f8eef1395cba67ad1604b26e4 to your computer and use it in GitHub Desktop.
//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