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 trialNoah Muhammad
Courses Plus Student 641 PointsMy code looks fine but I don't know what could be wrong with my concatenating and appending method
Please help with the last two lines of code and view my comment
// Enter your code below
var arrayOfInts = [1,2,3,4,5,6]
arrayOfInts.append(7)
arrayOfInts +=[8]//Tried using this aswell arrayOfInts + [8]
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! You're doing great! The reason this one isn't passing is because you're missing a space. Seriously, just a space. There should be a space between your +=
and your [8]
.
Also, you stated you tried arrayOfInts + [8]
, but you never said if you assigned it back into arrayOfInts. That would also work and should look like this:
arrayOfInts = arrayOfInts + [8]
Hope this is helpful!