From fe8e40080ac9009c164c3bda992cba6c9ea944b8 Mon Sep 17 00:00:00 2001 From: Dawn Rose <63545980+tastethedream@users.noreply.github.com> Date: Tue, 6 Dec 2022 08:06:25 +0000 Subject: [PATCH] Update ex5-2.md Code changed to reflect QC2 section 4.2 --- ch05/ex5-2.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/ch05/ex5-2.md b/ch05/ex5-2.md index 2394bc3..50e7f22 100644 --- a/ch05/ex5-2.md +++ b/ch05/ex5-2.md @@ -5,19 +5,9 @@ ```dart void main() { - - Map starWars = {"title": "Star Wars", "year": 1977}; - Map theEmpireStrikesBack = {"title": "The Empire Strikes Back", "year": 1980}; - - Map listFilms = {"first": starWars, "second": theEmpireStrikesBack}; - - Map currentFilm = listFilms['first']; - - String title = currentFilm['title']; - int year = currentFilm['year']; - - print (title); - print (year); + List listMonths = ['January', 'February', 'March']; + listMonths.add('April'); + listMonths.forEach(print); } ```