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!
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

Monosij Bagchi
Courses Plus Student 2,417 PointsBummer! You need to create a variable called `shoppingList`.
why i get this error
var shoppingList = [String]()
shoppingList += ["toothpaste","bread","eggs"]
1 Answer

Rich Bagley
25,868 PointsHi,
You have an extra space after var
. Remove that and you should be good to go :)
-Rich
William Li
Courses Plus Student 26,867 PointsWilliam Li
Courses Plus Student 26,867 Pointsmust say that the grader is very odd here for not allowing an extra space, the code is valid Swift.