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 trial

JavaScript JavaScript and the DOM (Retiring) Traversing the DOM Getting All Children of a Node with children

Shifat Kabir
Shifat Kabir
5,443 Points

Add item button isn't working...

https://w.trhou.se/pfn6h6c4kg

My console showing that error: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. at attachListItemButtons (app.js:17) at HTMLButtonElement.<anonymous> (app.js:75)

2 Answers

In each of your appendChild methods (up, down, remove) you want to append the element. You do this without quotes. For example:

li.appendChild(up)

instead of:

li.appendChild('up')
Shifat Kabir
Shifat Kabir
5,443 Points

Thank you KRIS NIKOLAISEN. But i know this but how did i make that kind of mistake..... lol :p