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 Interactive Web Pages with JavaScript Traversing and Manipulating the DOM with JavaScript Perform: Traversing Elements with querySelector

Matthew Lehman
Matthew Lehman
5,282 Points

Uncaught type error

https://w.trhou.se/k2iead7r9n

for some reason I really believe I have everything correct.

Not sure what is going wrong

Any help would be greatly appreciated

2 Answers

jobbol
seal-mask
.a{fill-rule:evenodd;}techdegree
jobbol
Full Stack JavaScript Techdegree Student 16,610 Points

Just a heads up

  • If you provide just enough detail,
  • isolate your problem to a small section of your code,
  • talk out how you arrived at the problem,
  • and give the exact error you got.

You'll not only help us help you faster, but your post will help other students as well.

The problem

Your problem is a typeo. This is a sample of the code giving you grief.

for(var i = 0; 1 < incompleteTasksHolder.children.length; i++) {

At a glance you can't see it, but you typed 1 < instead of i <. You want to prevent your index from passing the end, instead of having a check to see if your list is larger than one.

There's a second occurrence of this error as well. Look at both of your for-loops. Line 79 and 85.

Matthew Lehman
Matthew Lehman
5,282 Points

Thanks a lot Josh.

I actually caught my typo moments after I submitted the question. But I appreciate the help.

I will make sure I will clear up my problems next time I submit my question.