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 trialKaWai Guo
2,788 PointsWhat is 'arr'?
What is the purpose and point of arr? I know it's a parameter but what part of the overall code is 'arr' linked to?
3 Answers
Leopold Lucas
17,236 PointsIt is just an input parameter for the function, it is because you are passing in an array, looping through it then returning a string which joins together the different parts of the array. Does that answer your question?
Roger Hwang
3,851 PointsWhatever you will pass to a function are the parameters of a function and they can be named anything. In this case, "arr", which is also worded to hint that you'll pass in an array. Correct, you are passing in the arrays "correct" and "wrong" which you will create a list for each of them.
Sundar Maharjan
6,740 PointsIt's an array shortcut is arr.
KaWai Guo
2,788 PointsKaWai Guo
2,788 Pointsehhh. still confusing to me. thanks for you effort. can you word a little differently, please? Also, when you say array and when Dave saids array, are you guys referring to the "var correct" and "var wrong" array?