Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.