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 trialCody Norman
Full Stack JavaScript Techdegree Student 3,421 PointsWhat is the "correct" answer?
const orderQueue = ['1XT567437','1U7857317','1I9222528'];
const shipping = [];
orderQueue.shift();
shipping.push('1XT567437');
1 Answer
Steven Parker
231,269 PointsHere's some hints:
- don't replicate the value, access it by indexing into the array
- don't create a new array, just assign the value directly to the variable
Cody Norman
Full Stack JavaScript Techdegree Student 3,421 PointsThat second hint did the trick. Guess I was trying to make it more complicated then it needed to be. Thank you.
Cody Norman
Full Stack JavaScript Techdegree Student 3,421 PointsCody Norman
Full Stack JavaScript Techdegree Student 3,421 PointsI've tried 6 different ways, all of which work. but I keep getting: Bummer: Make sure that you're assigning the first element of the array to the
shipping
variable.Also unrelated the reason I added this comment is because I couldn't type everything in the original question for some reason.