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.
Heidi Toft1,894 Points
how to assign the result to a constant named value
I am unsure how to assign the result to a constant.
// Enter your code below var arrayOfInts = [1,2,3,4,5,6,] arrayOfInts.append(7) arrayOfInts = arrayOfInts +  arrayOfInts let value = arrayOfInts
Ashley Williams740 Points
Hi, Are you trying to add 7 onto the array? If so use the Array.push(7); Also what value are you trying to assign to the constant? The variable declaration for constants is: const yourVariableName;
Jason AndersTreehouse Moderator 145,624 Points
The challenges seems to be experiencing a tech glitch at the moment, so I cannot verify my answer.
If I remember the challenge correctly, you just have an extra line of code >>>
If you delete that line (it's not doing anything anyways, and keep the one below it, which is assigning that value to the constant.
Hopefully that was the problem. Let me know. :)
Thomas Dobson7,511 Points
as previously mentioned you have an extra line of code. remove:
This will remove the compiler error you are seeing.
step 4 is asking you to remove the 6th item in your array and assign it to a constant named discardedValue. this can be accomplished by:
let discardedValue = arrayOfInts.remove(at: 5)
I hope this helps.