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 trialNenad Marinkovic
13,310 PointsI am stuck and don't know whats wrong with code, please help!
// Why it always say "Wrong!" Please, help me understand this. Thanks!
var correct = 0; alert("Welcome to My Quiz."); var questionOne = prompt("Capitol of Germany?"); if (questionOne.toUpperCase() === 'Berlin') { alert("Correct answer!"); correct += 1; } else { alert("Wrong!"); }
2 Answers
Nenad Marinkovic
13,310 PointsOhh, I figured it out. :) I just had to write "BERLIN" instead of "Berlin". But thanks anyways!
Nenad Marinkovic
13,310 PointsThanks anyways, Samuel! Best.
SAMUEL LAWRENCE
Courses Plus Student 8,447 PointsSAMUEL LAWRENCE
Courses Plus Student 8,447 PointsYes exactly. sorry looked at your question late. Took me 3 days to get mines to work. so I didn't want to look at any questions during that time in case I found the answers without really trying.