From cfb34733963ed78cb134b9caff9bb0b0ba25aa34 Mon Sep 17 00:00:00 2001 From: Kirill Malev Date: Tue, 10 Mar 2020 13:44:54 +0300 Subject: Updated example 8 Updated const declaration and removed print addressing missing array. --- dart.html.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dart.html.markdown') diff --git a/dart.html.markdown b/dart.html.markdown index 2672dc6a..1e7233a4 100644 --- a/dart.html.markdown +++ b/dart.html.markdown @@ -198,7 +198,7 @@ class GenericExample{ /// or outside of class have to be constant. Strings and numbers are constant /// by default. But arrays and maps are not. They can be made constant by /// declaring them "const". Kind of similar to Javascript's Object.freeze() -const example8List = ["Example8 const array"], +const example8List = ["Example8 const array"]; const example8Map = {"someKey": "Example8 const map"}; /// Declare List or Maps as Objects. List explicitList = new List(); @@ -206,7 +206,6 @@ const example8Map = {"someKey": "Example8 const map"}; explicitList.add("SomeArray"); example8() { - print(example8Array[0]); print(example8Map["someKey"]); print(explicitList[0]); } -- cgit v1.2.3