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 trialSam Ketchum
2,558 PointsJavaScript Conditional Statements, if()+else() - else is popping up in browser but code challenge states does not exist
var a = 10; var b = 20; var c = 30; if ( a > b) { alert("a is greater than b!"); } else { alert("a is not greater than b!"); }
2 Answers
Steven Parker
231,269 PointsIf I remember correctly, the messages in this challenge should not have any punctuation. The challenges are very picky about output strings being exactly as provided. Remove the exclamation points and you should pass.
In future questions, always provide a link to the course page to help with creating accurate answers (or use the "Get Help" button which will create a link for you).
Sam Ketchum
2,558 PointsAbsolutely correct about the punctuation, thank you.