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 trialAry de Oliveira
28,298 PointsSwift Arrays
Challenge Task 1 of 4
We just learned the ins and outs of arrays, so let's put that knowledge into practice. Start by declaring a new array of Ints with six numbers as values. Assign this array to a variable named arrayOfInts.
// Enter your code below
var arrayOfInts todo: [string] = [
"1",
"2",
"3"
"4"
"5"
"6"]
5 Answers
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Points1) get rid of the word "todo"
2) capitalize the word "string"
3) make sure there's a comma between each item in the array
Stephen Whitfield
16,771 PointsHello Ary. Try Brendan's suggestion and let us know if you need any further insight!
Ary de Oliveira
28,298 Pointsthis quiet hard i am try but i can't do...
Stephen Whitfield
16,771 PointsIt always helps me to go back over the videos to rewatch something that I may still be having problems with. Maybe you should go back over the videos that deal with creating arrays? Try that!
Ary de Oliveira
28,298 PointsI tried but did not work, I do not have much experience with ios
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsSorry I forgot something. They want it to be an array of Ints not Strings. So the code would look like this:
var arrayOfInts: [Int] = [
1,
2,
3,
4,
5,
6]
Ary de Oliveira
28,298 Pointsthanks