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

JavaScript

JavaScript: Loops and Objects

Why doesn't the message print before it loops back to while loop for asking prompt? Right now, the message is only printed when the prompt is quit or canceled?

https://w.trhou.se/w12xjepaqo

1 Answer

Hey Naeem,

The behavior you noted is due to the way Chrome processes the code. Firefox behaves the way Dave's code does in the videos, so it's a little confusing when using Chrome and following his code word for word.

There are ways around this, but not if you want to stay true to the code he's showing in the videos.

Good luck with the course!