diff options
author | Kirill Malev <playittodeath@gmail.com> | 2020-03-10 13:44:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 13:44:54 +0300 |
commit | cfb34733963ed78cb134b9caff9bb0b0ba25aa34 (patch) | |
tree | 55ee911f3d8cb7e1d3895aad434011ae95602761 /dart.html.markdown | |
parent | 9e975a8dcf821ea385742cfe9088d72388d08e43 (diff) |
Updated example 8
Updated const declaration and removed print addressing missing array.
Diffstat (limited to 'dart.html.markdown')
-rw-r--r-- | dart.html.markdown | 3 |
1 files changed, 1 insertions, 2 deletions
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<T>{ /// 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<String> explicitList = new List<String>(); @@ -206,7 +206,6 @@ const example8Map = {"someKey": "Example8 const map"}; explicitList.add("SomeArray"); example8() { - print(example8Array[0]); print(example8Map["someKey"]); print(explicitList[0]); } |