Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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]");
Josh Olson
Josh Olson
13,236 Points

Andrew lied to us! Grab your pitchforks!

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