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

Ben Stanley
seal-mask
.a{fill-rule:evenodd;}techdegree
Ben Stanley
Full Stack JavaScript Techdegree Student 2,708 Points

Only giving bronze when I execute the JS.

I followed Dave's code in this video but I'm only "earning" bronze crowns here... I'm thinking it's in the "output rank" area of the code but I can't quite figure out exactly where it could have gone wrong because I pretty much copied Dave's to insure it wasn't just me. Still flagging it as bronze.

Workspace with code:

https://w.trhou.se/dl45oj5vzj

2 Answers

Nathan Dalbec
Nathan Dalbec
17,111 Points

It seems in your if statements you are using .toUpperCase() as a property (without the parenthesis), instead of as a method (with parenthesis) in all but the first.

So this:

if (answer2.toUpperCase === 'PYTHON') {
  correct += 1;
}

Should look like this:

if (answer2.toUpperCase() === 'PYTHON') {
  correct += 1;
}
Ben Stanley
seal-mask
.a{fill-rule:evenodd;}techdegree
Ben Stanley
Full Stack JavaScript Techdegree Student 2,708 Points

Thanks! I wasn't even looking in the correct place of the code for the error. It's always the syntax related stuff that gets me.

Thanks! I made the exact same mistake.