Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Foundations Arrays Methods: Part 3

Adam Duffield
Adam Duffield
30,494 Points

More Challenge Issues

See detail below...

<script>
  var first =  ["The", "quick", "brown", "fox", "jumps"]
  var second =  ["over", "the", "lazy"];
  var saying = first.concat(second + ",dog"); 
  var shortSaying = saying;
  var sayingString = saying;

  Bummer! Was expecting a 'saying' array of 'The,quick,brown,fox,jumps,over,the,lazy,dog' but got 'The,quick,brown,fox,jumps,over,the,lazy,dog'.
</script>

Hi Adam,

What's the question? Do you want me to guess?

Jeff

2 Answers

Chris Dziewa
Chris Dziewa
17,781 Points

You should always post details about the issue you are having so that when people take a look at your code they know how they can help you. For this one, your saying variable should look like this.

var saying = first.concat(second,"dog"); 

No + sign is necessary since the function knows whatever you put inside is being concatenated together.

Adam Duffield
Adam Duffield
30,494 Points

Yeah my bad, can be difficult to fit all the detail in sometimes due to the forum window not letting me go back to copy and paste more detail!

Thankyou for the help guys!

Chris Dziewa
Chris Dziewa
17,781 Points

Yeah that can be kind of irritating ha! I generally open another tab for a challenge or video when I need to do forum activities. It makes it at least a little easier to switch back and forth.