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
Ephraim Smith
11,930 PointsCONDITIONAL CHALLENGE: "output rank" part of code keeps program from running..
When I comment out the "output rank" portion of the program, it runs without issue. Compared against solution and reviewed for syntax errors...im missing something. Thanks in advance.
if (correct === 5) {
document.write("You earned a gold crown!");
} else if (correct >= 3) {
document.write("You earned a silver crown!");
} else if (correct >= 1) {
document.write("You earned a bronze crown!)";
} else {
document.write("No crown for you!");
}
-E
2 Answers
Frederick Reiss
15,003 PointsHello EphraimSmith,
Could you please provide the URL link of the challenge or teachers notes URL that you are working on? Also show the JavaScript code with the part that you have commented out.
Frederick Reiss
15,003 PointsBefore you answer me:
else if (correct >= 1) {
document.write("You earned a bronze crown!)";
Move the double quotes from after the ")" to before, let me know if that helps?
Ephraim Smith
11,930 PointsThanks, Fred. That was it. That's embarrassing.