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 trialHanwen Zhang
20,084 PointsHelp!!!!!! what is the answer for this one and why? what does the length mean here to get a total score?
Isn't the total score, we should add everything up? Thank you
1 Answer
Peter Vann
36,427 PointsHi Hanwen!
No, the question is:
Complete the code below to assign the totalScores variable THE NUMBER OF ELEMENTS in the scores array:
So you are just storing how many scores there are, not totalling them (in this case).
I hope that helps.
Stay safe and happy coding!
Hanwen Zhang
20,084 PointsHanwen Zhang
20,084 PointsThank you, Peter.