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 trialWenwei Lu
10,897 PointsOn line 18, set the variable 'saying' to the concatenation of the 'first' and 'second' arrays with the word "dog".
var first = ["The", "quick", "brown", "fox", "jumps"]
var second = ["over", "the", "lazy"];
var saying = (first.push(dog)).concat(second);
1 Answer
Dino Paškvan
Courses Plus Student 44,108 PointsThe concat method accepts numerous values as parameters.
So the dog should go as the second parameter of the concat
. You also don't have a variable dog, it should be a string literal, like this: "dog"
.
And you don't need .push
at all.
var someArray = anArray.concat(anotherArray, "some string");
Sunil Verma
Courses Plus Student 211 PointsSunil Verma
Courses Plus Student 211 Pointswhat is the wrapper, container in div tag, whats the use of it in this?