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

General Discussion


On about line 19, set the variable 'shortSaying' to be a slice of the 'saying' array to include the strings of "quick", "brown", and "fox".

im really stuck here any help???

4 Answers

Can you provide a little more? What lesson (language) are you working on and what does your code look like?

Hi Dave This what im doing but comes out wrong. <script> var first = ["The", "quick", "brown", "fox", "jumps"] var second = ["over", "the", "lazy"]; var saying = first.concat(second,"dog");

  var shortSaying = saying.slice(1, 2, 3);   // but says wrong ?

  var sayingString = saying;

Based on the code you provided, the slice returns the word 'quick'. You want it more like var shortSaying = saying.slice(1,4); I don't know what the third number is for...the slice syntax is 'string.slice(start,end)'. That is probably where you are running into an issue.

Thanks Dave that helped i didn't remove the "var" thanks again took me a 1 hour and fell a sleep haha.