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!
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
jonathan addy
15,534 PointsMethods Part 1: Elements task 3 -On about line 20, add the 'firstWord' variable to the beginning of the array 'saying'.
On Methods Part 1: Elements task 3 the question asks "On about line 20, add the 'firstWord' variable to the beginning of the array 'saying'."
I am answering
saying.unshift("firstWord"); but cant seem to get past this where am I going wrong?
3 Answers

Zoe Peng
10,809 PointsYou should take off the quotation
saying.unshift(firstWord);

Andrew Shook
31,709 PointsNever mind, the problem is a syntax error. When you pass a variable, like firstWord, into a method as an argument you don't need to put it in quotations. Right now you are putting the word "firstWord" into the array as the first word instead of the value of the firstWord variable.

christopher couret
10,297 Pointsgreat! I have the same answer
saying.unshift(firstWord);
Andrew Shook
31,709 PointsAndrew Shook
31,709 PointsWhich lesson is this from? I can't seem to find it for reference.