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 trialyosef levertov
5,497 PointsI've been stuck on this problem for a few weeks now, some help please...
can't get past part 1 of 4
3 Answers
James Barnett
39,199 PointsHere's a hint as the wording of this challenge leaves something to be desired.
- Remove the first value from the array
- Remove a value to the end of the array
- Add a value to the beginning of the array
- Add a value to the end of the array
Check out this list of JavaScript array-related methods and see if you con figure out the correct method to use for each of the 4 steaps
If you need a refresher on the syntax for these methods check out this page
Stephen Whitfield
16,771 PointsLet me reword what they're asking for because it reads a little too vaguely even for me:
On line 18, use a method on the 'spareWords’ array to set 'firstWord' to be first word of the 'spareWords’ array. Also be sure that the first word of the spareWords array is removed from the array.
So what they are wanting is for you to remove the first word from the "spareWords" array and set it equal to the variable "firstWord" that has already been declared.
Eivind Jonassen
5,994 PointsI was stuck on that challenge for quite some time as well.. Maybe the persons in charge of the course can look at it and maybe ask the question in a different manner. Also change the variable names, because it makes it hard to read and comprehend as it is now.
Aimee Ault
29,193 PointsAimee Ault
29,193 PointsHi Yosef, can you edit your post to include the code that you're trying?