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

Literally wrote every single line of code EXACTLY as Dave does in the video and not a single thing happens when executed

Someone needs to fix this video so people don't spend hours trying to find out why Dave's code does not work.

Michael Geatz
Michael Geatz
6,093 Points

What does your code look like at the moment? Please paste it here so we can identify where you are getting held up.

A few tips for this exercise:

  • Dave's conditional statements are using || (i.e., OR). You need to replace these with && (i.e., AND). The request requires today to be Friday, so you that's why you can't use OR. If you use OR, then if either condition is true it will run that code.
  • You also need to modify the last else if statement from ( today !== 'Friday' ) to ( today == 'Friday' && money < 10). This tells the program that today is Friday, but since you don't have more than $10 you can't go to the movie.

1 Answer

I noticed as Dave was typing out the code that he forgot to add the opening and closing parenthesis to .toUpperCase() after the first question. I added the parenthesis and it was able to work. Fix that and everything else should work.