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 trialremusbandacu
2,060 PointsBummer! Your `favoriteSports` variable has the wrong value in it: `[football, basketball, tennis, voleyball]`.
Neither append nor insert work for this task, it's still giving me the same error. Am I completely stupid and missing something, or is it a bug?
let bestSmartphone = "iPhone"
var favoriteSports: [String] = ["football", "basketball", "tennis"]
favoriteSports.append("voleyball")
5 Answers
Marcus Leon
755 Pointsvoleyball is misspelled.
Marcus Leon
755 Pointseverything seems right to me except for strings. I don't believe it's has to be there for the challenge. although its right because it work fine for me in playground.
var favoriteSports = ["football", "basketball", "tennis"]
remusbandacu
2,060 PointsThe challenge it's displaying the error at is the 3rd one, which states 'Whoops, we forgot that volleyball is also one of our favorite sports. Add the string "volleyball" to our favoriteSports array.'
Appending 'voleyball' for this task does not work. Neither does inserting it.
remusbandacu
2,060 PointsLooks like I'm an idiot. Thanks!
ellie adam
26,377 PointsI had the same error, I tried 10 times. Then finally passed it.
favoriteSports.append("volleyball")