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 trialJamie Konrad
2,122 PointsI Copied the code from the Video yet the buttons dont show up, what am I doing wrong?
function attachRemoveButton (li){
let remove = document.createElement('button');
remove.className = 'remove';
remove.textContent = 'Remove';
li.appendChild(remove);
}
for(let i = 0; i< listItems.lenght; i++){
attachRemoveButton(listItems[i])
}
Title says all
1 Answer
Rohald van Merode
Treehouse StaffHey Jamie Konrad 👋
Looks like you have a typo in your for
loop. It currently says listItems.lenght
instead of listItems.length
🙂
If you're coding with VC Code I'd highly recommend installing the Code Spell Checker extension. This makes typos stand out more by underlining them. This extension has saved me a bunch of time debugging my typos 😄
Hope this helps!