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 trialMika Kiela
2,178 PointsHi, fellas! I don't get this third task.
I think I have done everything right, but it just doesn't work. Any help? The question was about reading from arrays.
var arrayOfInts: [Int] = [1,2,3,4,5,6]
arrayOfInts.append(7)
arrayOfInts += [8]
let fifthValue = arrayOfInts[4]
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! You're doing great, but you seem to have missed part of the instructions. Your code is actually just fine, but you misnamed the constant so now it can't find the constant it's looking for. You did, however, manage to assign the correct value so kudos!
You named your constant fifthValue
but the variable must be named value
for the challenge to pass. The challenges are extremely strict.
Take a look:
let value = arrayOfInts[4]
Happy coding!
Mika Kiela
2,178 PointsMika Kiela
2,178 PointsThank you Jennifer!