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 Selecting Elements and Adding Events with JavaScript Perform: Selecting Elements

Code doesn't work in Workspace, but does in Sublime

My code wasn't working in the Workspace when I was trying to test the variable "taskInput", I kept getting an error message "Uncaught ReferenceError: taskInput is not defined "

However, when I download the code, test it in Sublime, it works but then when I copy the same exact code (that was downloaded) and paste it into the Workspace, it doesn't work, I get the same error message. So, I'm sticking to Sublime.

3 Answers

Make sure var addButton is closed with a semicolon. var addButton; (in this particular video we didn't go over it yet, but wasn't closed) on my side.

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

It sounds very weird..

Can we have a look at the code that does not work?

ty

I would copy and paste it here, but it doesn't seem to act accordingly. It renders all wonky and I don't see an attach button anywhere.

Hi Ron,

This will show you how to post code: https://teamtreehouse.com/forum/posting-code-to-the-forum