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.
JS is not executing in order what sir says why?
Dave McFarland sir why mine is not same as your output
alert("Hello world"); document.write("<h1>Hello world</h1>"); alert();
as sir says that JS engine execute it in one by one order but in my chrome browser first alert comes that says "Hello world" and then i click on OK button H1 tag not execute another alert comes and after second alert's executes and i click on its OK button H1 then appears why so in sirs browser alert comes h1 comes and alert comes why my is not same
Steven Parker208,474 Points
Modern browsers work a bit differently than the one in the video.
This should probably be mentioned in the "teacher's notes". You might want to report this as a bug using the Support page - it may even get you a "special Exterminator badge".
Dave McFarlandTreehouse Teacher
Sorry about that! Thanks Steven Parker for steering j s in the correct direction. I'm in the middle of updating several videos in this course that suffer from this same problem, so a fix should be in sometime (relatively) soon -- holidays are here, so probably not until beginning of January.
Nick PostPro Student 3,155 Points
Same issue...... came here and it said this bug was to be worked out in January? Was that of 2017?