Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

michelle Jia
4,814 Pointsi checked the order that the programme runs on my site. why the 2nd command run after the 1st and 3rd commands complete?
the teacher mentioned in the video that the command would run one after the other right?
2 Answers

Antony .
2,812 PointsThis is because the behavior of browsers have changed how they handle loops just across the board.
To make things a little more clear and concise, this isn't your fault. It's the browsers. The browsers behavior has changed since the video was uploaded. So in your case, any alert function that gets placed will print out first.

Robert O'Toole
6,352 Pointsthanks! how can we override this?
Dawson St. Julien
1,246 PointsDawson St. Julien
1,246 PointsThanks Antony Pesantez!
michelle Jia
4,814 Pointsmichelle Jia
4,814 Pointsthank you.
Tomasz Grodzki
7,705 PointsTomasz Grodzki
7,705 PointsThanks!