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: Creating Elements

Lea Pritchard
Lea Pritchard
7,040 Points

I'm getting an "uncaught error" message unless I comment out part of the code that appears to match Andrew's.

//Cycle over incompleteTasksHolder ul list items
for(var i = 0; i < incompleteTaskHolder.children.length; 1++) {
  console.log("Bind list items...");
    //bind events to list item's children (taskCompleted)
     bindTaskEvents(incompleteTaskHolder.children[i], taskCompleted);
}

//Cycle over completedTasksHolder ul list items
for(var i = 0; i < completedTasksHolder.children.length; 1++) {
  console.log("Bind list items...");
    //bind events to list item's children (taskIncomplete)
     bindTaskEvents(completedTasksHolder.children[i], taskIncomplete);
}

Am I making a mistake or is there a bug in Workspace?

Lea Pritchard
Lea Pritchard
7,040 Points

I found it - typo. :)

I had a "1" where my "i" was supposed to be.

//Cycle over incompleteTasksHolder ul list items for (var i = 0; i < incompleteTaskHolder.children.length; i++) { console.log("Bind list items..."); //bind events to list item's children (taskCompleted) bindTaskEvents(incompleteTaskHolder.children[i], taskCompleted); }

//Cycle over completedTasksHolder ul list items for (var i = 0; i < completedTasksHolder.children.length; i++) { console.log("Bind list items..."); //bind events to list item's children (taskIncomplete) bindTaskEvents(completedTasksHolder.children[i], taskIncomplete); }