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 trialcameron williams
1,819 Pointsresult '' after function. += wont work
function createListItems(arr) {
let items = '';
for (let i=0; i< arr.legnth; i++) {
items += <li>${ arr[i] }</li>
;
}
return items;
}
this is my code and my result is: ''
1 Answer
Ashley Schott
7,944 PointsIt looks like you may have set your items variable equal to a double quote (") instead of using an empty string of two single quotes (' ').
Caleb Kemp
12,754 PointsCaleb Kemp
12,754 PointsIf that is actually your code, perhaps the problem is being caused because you spelled "length" as "legnth"? Just a thought...