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 trial

JavaScript

Arrays Method 1 challenge

Need answer

Link http://teamtreehouse.com/library/websites/javascript-foundations/arrays/methods-part-1-elements

Stuck on line 20, I get the following error. You're missing the 'unshift' method and the 'firstWord' variable. Various failed attempts, would love an option to show correct answer when you can't figure it out.

My last attempt was this: saying.unshift("quick");

3 Answers

The directions mention using the variable firstWord, try that instead of using the string literal quick which is the contents of that variable.

exactly as it is asking. Add 'firstword' variable to saying

saying.unshift(firstWord);

dont do this because you are adding a string whose value is 'firstWord'

saying.unshift('firstWord');

It worked Thanks!! WOW I must have spelled firstWord with lowercase w on one of my previous attempts. I lost quite some time trying to get it right, I will regroup tomorrow.

You brought up a good point. Javascript is case sensitive. It means that firstWord is not the same as firstword variable