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: Changing Classes

Erik Nuber
Erik Nuber
20,629 Points

Perform: Changing Classes video has an error in code yet for Andrew still worked

Just a quick statement...

In the video the following variable is shown incorrectly without a closing bracket. Yet, the code still works for him...

var editInput = listItem.querySelector("input[type=text");

correctly it should be

var editInput = listItem.querySelector("input[type=text]");

I noticed that as well and also on a previous video his add button worked yet at no point did he bind it to any event???

1 Answer

Heather Woods
Heather Woods
5,330 Points

I copied what he wrote out of curiosity and it worked for me before and after I fixed the code. I assumed it was shorthand we hadn't learned yet