Skip to content

Instantly share code, notes, and snippets.

@nrm176
Last active May 14, 2019 06:11
Show Gist options
  • Save nrm176/6f56df273d9c65c55aea9dd6b998deba to your computer and use it in GitHub Desktop.
Save nrm176/6f56df273d9c65c55aea9dd6b998deba to your computer and use it in GitHub Desktop.
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
print('-----');
List myList = [1, 2, 3, 4];
myList.map((x) => x * 2).forEach((e)=> print(e));
print('-----');
myList.where((x) => x % 2 == 0).map((x) => x + 1).forEach((e)=> print(e));
print('-----');
var city_name = 'Tokyo';
print(city_name);
print('-----');
// var String family_name = 'Minami'; //cant do. variables cant be declared using both var and a type name.
// print(family_name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment