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 trialAlexey Tseitlin
5,866 PointsSomething is wrong
==
Say you have two arrays -- oldScores and newScores and you want to combine those two into a new array named allScores. Complete the code so that the new array first has the old scores listed followed by the new scores:
var allScores = .concat();
Tried "var allScores = newScores.concat( oldScores);" and "var allScores = oldScores.concat(newScores);"
all wrong....
3 Answers
Marileen Mennerich
1,161 Pointsvar allScores = oldScores.concat(newScores); worked for me, maybe you had a little typo somewhere?
Greg Phil
1,149 PointsThis is not working for me. This is copy and pasted directly from what I have on the screen. Can anyone see where I went wrong?
var allScores = oldScores.concat(newScores);
John Eiler
10,499 Pointsvar allScores = oldScores.concat(newScores);
Khalid Yousif
2,785 Pointsvar allScores = oldScores.concat(newScores);
Alexey Tseitlin
5,866 PointsAlexey Tseitlin
5,866 Pointsno, Copy&paste it 3 times...
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsMarileen Mennerich's answer worked for me as well in the quiz.