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 JavaScript Basics (Retired) Making Decisions with Conditional Statements The Conditional Challenge Solution

kabirdas
kabirdas
1,976 Points

The content for this video may need to be re-done

Hi,

I believe the content for this video may need to be re-done, and I'm not sure where to inform Treehouse of this. The "()" is left out after every ".toUpperCase" method, which will cause errors, I believe.

I don't know if there is a way to do it without the "()," but I thought it was required. Can someone confirm? Perhaps moderator?

Thanks

Matt Conley
Matt Conley
Courses Plus Student 512 Points

toUpperCase() is a javascript function, so to my knowledge it would create issues without the () being there. I tested on my own code and it doesnt work properly without it, but Im too new to all of this say for certain.

6 Answers

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,077 Points

It does seem to me that the answers he provided do have syntax errors.

kabirdas
kabirdas
1,976 Points

thanks everyone!

andren
andren
28,558 Points

You are correct, leaving off the parenthesis will cause problems. The parenthesis tells JavaScript that you want to call the function, if you don't include them then the function is simply referenced, not called.

So in the video you link to the if statements for most of the questions actually compare the toUpperCase function itself (the code that makes it up) against the answers, rather than comparing the result of calling toUpperCase which is clearly the intent.

As for contacting Treehouse, they do have a support page that feature a contact form. As well as a support email address which is help@treehouse.com.

My guess would be that sending an email would be the most efficient way to go if you want a somewhat timely response to your inquiry. That's the approach I have taken in the past when I have wanted to bring something up to them.

I noticed that as well! haha! Great callout I thought he was doing it on purpose to show an error.

I am so glad I read this couldn't figure out why my correct variable wasn't adding the answer total correctly. Added the missing parentheses and now every thing works fine.

What bugged me as well was the extra space after in the first "if" clause after the opening parenthesis but before answer1. Also, didn't close the statement for the number of correct answers right. The video went "p" instead of "/p". Are those correct? I am not sure. I am still very new.

andren
andren
28,558 Points

The extra space is technically fine, since JavaScript for the most part ignores spaces. Your second complaint about the incorrectly closed <p> tag is correct though.

Forgetting the / when closing a tag is a pretty common mistake, but it can definitively lead to some unexpected behavior when rendering the page.