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 trialMatt WebDev218
Front End Web Development Techdegree Graduate 18,099 PointsI don't understand why my code isn't accepted, it works fine in the console
The only error message I receive is 'Bummer: Try again!'. No explanation. Please help!
// Display the prompt dialogue while the value assigned to `secret` is not equal to "sesame"
// This should run after the loop is done executing
let secret;
do {
secret = prompt("What is the secret password?");
} while (secret != 'seasame');
alert("You know the secret password. Welcome!");
2 Answers
Joseph Yhu
PHP Development Techdegree Graduate 48,638 PointsYou have a typo: } while (secret != 'seAsame');
(should be sesame
), and you have to use the strict not equals operator: !==
.
Matt WebDev218
Front End Web Development Techdegree Graduate 18,099 PointsAh, good catch. Thanks!