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


Ayush Bahuguna
Ayush Bahuguna
2,092 Points

My JavaScript program is not working.

I have written a JavaScript program for the code challenge under JavaScript basics. I have checked the program for errors but, couldn't find any.

Here's the snapshot of my workspace. https://w.trhou.se/kc712sgpe0

1 Answer

Gina Scalpone
Gina Scalpone
21,330 Points

The main problem is that .toUpperCase() is a method, so you need the parentheses to call it.

The other problem (which should display in your console) is in your if-else statements; you have them written "(3 =< score =< 4)", which will cause a Reference Error because the variable needs to be on the left. Instead, you can write "(score >= 3 && score <= 4)" -- score is greater than or equal to 3 AND less than or equal to 4 -- or "(score === 3 || score === 4)" -- score equals 3 OR score equals 4.