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 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.