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

iOS Swift Collections and Control Flow Introduction to Collections Working With Arrays

Adelita Gonzales
Adelita Gonzales
1,837 Points

What am I doing wrong here?

retrieving data from position 5 and assigning to constant named value.

array.swift
// Enter your code below
var arrayOfInts = [1,2,3,4,5,6,]
arrayOfInts.append (7)
arrayOfInts += [7]
arrayOfInts[4]
let Value = arrayOfInts[4]

Your code is right, you just need to change the casing of your constant to lower case.

3 Answers

Nick Frozz
Nick Frozz
31,289 Points

I think that u r already done with that challenge, but anyways - a proplem was in line "arrayOfInts[4]" which is unnecessary in this challenge and also upper case "V".

GL next.

Adelita Gonzales
Adelita Gonzales
1,837 Points

Yes, thank you! The “arrayOfInts[4]” was the hold up! :)

Adelita Gonzales
Adelita Gonzales
1,837 Points

facepalm D’oh!!! I couldn’t figure out for the life of me what had gone wrong! Thank you!!!

Adelita Gonzales
Adelita Gonzales
1,837 Points

hmmm... changed the case and still get the "Bummer..." message.