Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Go Language Go Language Overview Data Structures Maps

for the maps objective question, is it possible to put " " around the word strings in the question? the key isnt clear

the question was simple. i just didn't know until further review that the name was strings, since naming threw me off.

current: challenge task 1 of 1

The HalfPriceSale function should receive a map with product name strings as its keys, and corresponding prices as its values, like this: {"OCKOPROG": 89.99, "ALBOÖMME": 129.99, "TRAALLÅ", 49.99}

new: The HalfPriceSale function should receive a map with product name "strings" as its keys, and corresponding prices as its values, like this: {"OCKOPROG": 89.99, "ALBOÖMME": 129.99, "TRAALLÅ", 49.99}

1 Answer

Steven Parker
Steven Parker
231,261 Points

The word strings here is referring to the object type of the product names, so it would not be appropriate to enclose it in quotes.

Placing it in quotes would imply that the word "strings" was actually one of the product names, which is not true.

isnt the object type just string and in this case strings is the variable type name?

Steven Parker
Steven Parker
231,261 Points

The terms "object" and "variable" refer to the same thing. The type is string and strings is just the plural (referring to more than one).