Adding an element to a map

For these directions…Using the code from the previous example, add a record to your map. Now print the map out using the “range” loop

What is wrong with this:

https://play.golang.org/p/qL3iaNCgUVU

You are missing a closing quote, therefore go extends the string you want to use as a key for the map access up to the quote that should start the grandma string.

2 Likes

https://play.golang.org/p/BEpO90T6lFm

It worked ! Thanks for your help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.